This commit is contained in:
syuilo
2026-02-17 16:27:47 +09:00
parent 9475e6151f
commit 5619cbb0da
5 changed files with 27 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<canvas ref="canvas" :class="$style.canvas" @keypress="onKeypress" @wheel="onWheel"></canvas>
<div v-if="engine != null" class="_buttons" :class="$style.controls">
<!--<MkButton v-for="action in actions" :key="action.key" @click="action.fn">{{ action.label }}{{ hotkeyToLabel(action.hotkey) }}</MkButton>-->
<MkButton @click="toggleLight">Toggle Light</MkButton>
<MkButton :primary="engine.isEditMode.value" @click="toggleEditMode">Edit mode: {{ engine.isEditMode.value ? 'on' : 'off' }}</MkButton>
<template v-if="engine.isEditMode.value">
<MkButton v-if="engine.ui.isGrabbing" @click="endGrabbing">Put (E)</MkButton>
@@ -267,6 +268,13 @@ onMounted(() => {
rotation: [0, Math.PI / 2, 0],
sticky: 'j',
options: {},
}, {
id: 'a37cb419-d028-47a7-b317-7553bc2553e0',
type: 'ductTape',
position: [131, 85, 126],
rotation: [0, 0, 0],
sticky: 'j4',
options: {},
}, {
id: 'j3',
type: 'powerStrip',

View File

@@ -16,6 +16,7 @@ import { chair } from './objects/chair.js';
import { colorBox } from './objects/colorBox.js';
import { cupNoodle } from './objects/cupNoodle.js';
import { desk } from './objects/desk.js';
import { ductTape } from './objects/ductTape.js';
import { energyDrink } from './objects/energyDrink.js';
import { facialTissue } from './objects/facialTissue.js';
import { keyboard } from './objects/keyboard.js';
@@ -53,6 +54,7 @@ export const OBJECT_DEFS = [
colorBox,
cupNoodle,
desk,
ductTape,
energyDrink,
facialTissue,
keyboard,

View File

@@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineObject } from '../engine.js';
export const ductTape = defineObject({
id: 'ductTape',
defaultOptions: {},
placement: 'top',
createInstance: () => {
return {
interactions: {},
};
},
});