[+] Editor controls
This commit is contained in:
@@ -20,7 +20,10 @@ export const config = {
|
|||||||
cursor: {radius: 2, width: 0.3, color: new Color('#333')},
|
cursor: {radius: 2, width: 0.3, color: new Color('#333')},
|
||||||
|
|
||||||
// Debug mode
|
// Debug mode
|
||||||
debug: true
|
debug: false,
|
||||||
|
|
||||||
|
// Edit mode
|
||||||
|
editMode: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export const colors = {
|
export const colors = {
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ function init(): void
|
|||||||
objects.box = lineSegments
|
objects.box = lineSegments
|
||||||
scene.add(lineSegments)
|
scene.add(lineSegments)
|
||||||
|
|
||||||
scene.add(circle(0xffff00, 0, 5))
|
// scene.add(circle(0xffff00, 0, 5))
|
||||||
scene.add(circle(0xff00ff, 1, 4))
|
// scene.add(circle(0xff00ff, 1, 4))
|
||||||
scene.add(circle(0x0000ff, 2, 3))
|
// scene.add(circle(0x0000ff, 2, 3))
|
||||||
scene.add(circle(0x00ffff, 3, 2))
|
// scene.add(circle(0x00ffff, 3, 2))
|
||||||
scene.add(circle(0xff0000, 4, 1))
|
// scene.add(circle(0xff0000, 4, 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buffer for smooth update
|
// Buffer for smooth update
|
||||||
|
|||||||
@@ -1,16 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="NewHome">
|
<div id="NewHome">
|
||||||
<canvas id="three"></canvas>
|
<canvas id="three"></canvas>
|
||||||
|
|
||||||
|
<!-- Editor controls -->
|
||||||
|
<div id="editor-controls" class="fbox-vcenter">
|
||||||
|
<span>Editor</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {Options, Vue} from 'vue-class-component';
|
import {Options, Vue} from 'vue-class-component';
|
||||||
import {start} from "@/animation/Home";
|
import {start} from "@/animation/Home";
|
||||||
|
import {config} from "@/animation/Config";
|
||||||
|
|
||||||
@Options({components: {}})
|
@Options({components: {}})
|
||||||
export default class NewHome extends Vue
|
export default class NewHome extends Vue
|
||||||
{
|
{
|
||||||
|
editMode = config.editMode
|
||||||
|
|
||||||
mounted(): void
|
mounted(): void
|
||||||
{
|
{
|
||||||
start('three')
|
start('three')
|
||||||
@@ -27,4 +35,18 @@ export default class NewHome extends Vue
|
|||||||
left: 0
|
left: 0
|
||||||
z-index: 1
|
z-index: 1
|
||||||
cursor: none
|
cursor: none
|
||||||
|
|
||||||
|
#editor-controls
|
||||||
|
position: absolute
|
||||||
|
top: 20px
|
||||||
|
left: 0
|
||||||
|
z-index: 2
|
||||||
|
|
||||||
|
height: 50px
|
||||||
|
width: calc(100vw - 100px)
|
||||||
|
margin-left: 50px
|
||||||
|
border-radius: 50px
|
||||||
|
|
||||||
|
color: #ffeedb
|
||||||
|
background-image: linear-gradient(180deg, #000000 0%, #434343 100%)
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user