├── project ├── editor │ ├── libs │ │ └── Ani-1.0.0.jar │ ├── data │ │ ├── img │ │ │ ├── upIcon.png │ │ │ ├── background.png │ │ │ ├── downIcon.png │ │ │ ├── icon_flat.png │ │ │ ├── icon_layer.png │ │ │ ├── icon_mask.png │ │ │ ├── icon_noise.png │ │ │ ├── ntm_logo.png │ │ │ ├── selectedBG.png │ │ │ ├── background2.png │ │ │ ├── background3.png │ │ │ ├── icon_islands.png │ │ │ ├── opus_splash.png │ │ │ ├── icon_combined.png │ │ │ ├── icon_continent.png │ │ │ └── transparentBG.png │ │ ├── skin │ │ │ ├── uiskin.png │ │ │ └── default.png │ │ ├── docu │ │ │ ├── img │ │ │ │ ├── chunk.jpg │ │ │ │ ├── grid.jpg │ │ │ │ ├── layer.jpg │ │ │ │ ├── opus_logo.png │ │ │ │ ├── sampler_masked.png │ │ │ │ ├── modifier_sharpen.png │ │ │ │ ├── sampler_continent.png │ │ │ │ ├── sampler_noise_sn.png │ │ │ │ └── chunks_datastructure.jpg │ │ │ ├── raw │ │ │ │ ├── chunk.psd │ │ │ │ ├── grid.psd │ │ │ │ └── layer.psd │ │ │ ├── smoothEdge.png │ │ │ ├── js │ │ │ │ └── highlight │ │ │ │ │ ├── styles │ │ │ │ │ ├── pojoaque.jpg │ │ │ │ │ ├── school_book.png │ │ │ │ │ ├── brown_papersq.png │ │ │ │ │ ├── androidstudio.css │ │ │ │ │ ├── ascetic.css │ │ │ │ │ ├── mono-blue.css │ │ │ │ │ ├── codepen-embed.css │ │ │ │ │ ├── hopscotch.css │ │ │ │ │ ├── tomorrow.css │ │ │ │ │ ├── vs.css │ │ │ │ │ ├── paraiso.dark.css │ │ │ │ │ ├── paraiso.light.css │ │ │ │ │ ├── kimbie.dark.css │ │ │ │ │ ├── ir_black.css │ │ │ │ │ ├── kimbie.light.css │ │ │ │ │ ├── tomorrow-night-bright.css │ │ │ │ │ ├── tomorrow-night-eighties.css │ │ │ │ │ ├── rainbow.css │ │ │ │ │ ├── atelier-dune.dark.css │ │ │ │ │ ├── atelier-dune.light.css │ │ │ │ │ ├── tomorrow-night.css │ │ │ │ │ ├── atelier-heath.dark.css │ │ │ │ │ ├── atelier-heath.light.css │ │ │ │ │ ├── tomorrow-night-blue.css │ │ │ │ │ ├── atelier-forest.dark.css │ │ │ │ │ ├── atelier-forest.light.css │ │ │ │ │ ├── atelier-seaside.dark.css │ │ │ │ │ ├── atelier-seaside.light.css │ │ │ │ │ ├── atelier-lakeside.dark.css │ │ │ │ │ ├── atelier-lakeside.light.css │ │ │ │ │ ├── atelier-sulphurpool.dark.css │ │ │ │ │ ├── atelier-sulphurpool.light.css │ │ │ │ │ ├── solarized_dark.css │ │ │ │ │ ├── solarized_light.css │ │ │ │ │ ├── pojoaque.css │ │ │ │ │ ├── dark.css │ │ │ │ │ ├── brown_paper.css │ │ │ │ │ ├── github.css │ │ │ │ │ ├── far.css │ │ │ │ │ ├── foundation.css │ │ │ │ │ ├── idea.css │ │ │ │ │ ├── zenburn.css │ │ │ │ │ ├── magula.css │ │ │ │ │ ├── school_book.css │ │ │ │ │ ├── atelier-cave.dark.css │ │ │ │ │ └── atelier-cave.light.css │ │ │ │ │ └── LICENSE │ │ │ ├── layer.html │ │ │ ├── overview.html │ │ │ ├── interpreter.html │ │ │ ├── css │ │ │ │ └── avenir-white.css │ │ │ ├── index.html │ │ │ └── modifier.html │ │ └── editor_settings.json │ ├── assets │ │ └── opus_spash.psd │ ├── src │ │ └── com │ │ │ └── nukethemoon │ │ │ └── tools │ │ │ └── opusproto │ │ │ └── editor │ │ │ ├── message │ │ │ ├── CommandSnapshot.java │ │ │ ├── CommandOpenSaveAs.java │ │ │ ├── CommandSaveProject.java │ │ │ ├── CommandRefreshLayout.java │ │ │ ├── CommandOpenAboutWindow.java │ │ │ ├── CommandOpenWorldEditor.java │ │ │ ├── CommandSnapshotDelete.java │ │ │ ├── CommandLimitWindowSizes.java │ │ │ ├── CommandOpenProjectWindow.java │ │ │ ├── CommandOpenSettingsWindow.java │ │ │ ├── layer │ │ │ │ ├── EventLayersChanged.java │ │ │ │ ├── CommandCreateLayer.java │ │ │ │ ├── CommandDeleteLayer.java │ │ │ │ └── CommandOpenLayerEditor.java │ │ │ ├── sampler │ │ │ │ ├── CommandOpenSamplerList.java │ │ │ │ ├── EventSamplerPoolChanged.java │ │ │ │ ├── CommandDeleteSampler.java │ │ │ │ ├── EventSamplerUpdated.java │ │ │ │ ├── CommandOpenSamplerEditor.java │ │ │ │ └── CommandCreateSampler.java │ │ │ ├── interpreter │ │ │ │ ├── CommandOpenInterpreterList.java │ │ │ │ ├── EventInterpreterPoolChanged.java │ │ │ │ ├── CommandCreateInterpreter.java │ │ │ │ ├── CommandDeleteInterpreter.java │ │ │ │ └── CommandOpenInterpreterEditor.java │ │ │ ├── AbstractMessageWithId.java │ │ │ ├── CommandDrawMap.java │ │ │ ├── CommandShowDependencyWindow.java │ │ │ ├── CommandGenerateWorld.java │ │ │ ├── CommandSnapshotChangeSettings.java │ │ │ ├── CommandDrawRectangle.java │ │ │ ├── CommandSnapshotBySampler.java │ │ │ └── CommandRenameElement.java │ │ │ ├── ui │ │ │ ├── sampler │ │ │ │ ├── Notifyable.java │ │ │ │ ├── formular │ │ │ │ │ ├── noise │ │ │ │ │ │ ├── algorithm │ │ │ │ │ │ │ └── SimplexConfigForm.java │ │ │ │ │ │ └── NoiseSamplerForm.java │ │ │ │ │ └── FlatSamplerForm.java │ │ │ │ ├── RangeTable.java │ │ │ │ ├── CursorTextField.java │ │ │ │ ├── InputTable.java │ │ │ │ ├── previews │ │ │ │ │ └── SamplerHoverPreviewElement.java │ │ │ │ └── AbstractSamplerForm.java │ │ │ ├── TreeExpansionListener.java │ │ │ ├── dialogs │ │ │ │ ├── YesNoDialog.java │ │ │ │ ├── ErrorDialog.java │ │ │ │ ├── SuccessDialog.java │ │ │ │ ├── NewInterpreterDialog.java │ │ │ │ ├── BaseDialog.java │ │ │ │ ├── RenameDialog.java │ │ │ │ ├── SaveAsDialog.java │ │ │ │ ├── NewLayerDialog.java │ │ │ │ ├── NewSamplerDialog.java │ │ │ │ ├── NewProjectDialog.java │ │ │ │ └── LoadDialog.java │ │ │ ├── menu │ │ │ │ └── tables │ │ │ │ │ ├── HelpTable.java │ │ │ │ │ ├── FileTable.java │ │ │ │ │ ├── InfoTable.java │ │ │ │ │ ├── AbstractMenuTable.java │ │ │ │ │ ├── MenuButton.java │ │ │ │ │ └── SnapshotTable.java │ │ │ ├── windows │ │ │ │ ├── ClosableWindow.java │ │ │ │ ├── AboutWindow.java │ │ │ │ └── SettingsWindow.java │ │ │ └── UpDownElement.java │ │ │ ├── app │ │ │ ├── ExitDialogInterface.java │ │ │ └── EditorApplication.java │ │ │ ├── DesktopLauncher.java │ │ │ ├── Config.java │ │ │ ├── MyGdxGame.java │ │ │ └── Settings.java │ └── build.gradle ├── gradle.properties ├── example │ ├── data │ │ ├── chunk_x0_y0.png │ │ ├── chunk_x0_y1.png │ │ ├── chunk_x1_y0.png │ │ └── chunk_x1_y1.png │ ├── libs │ │ ├── opuslib-0.0.1a.jar │ │ └── opusloaderjson-0.0.1a.jar │ └── build.gradle ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── opuslib │ ├── src │ │ └── com │ │ │ └── nukethemoon │ │ │ └── tools │ │ │ ├── opusproto │ │ │ ├── sampler │ │ │ │ ├── ISeedContainer.java │ │ │ │ ├── masked │ │ │ │ │ └── MaskedSamplerConfig.java │ │ │ │ ├── flat │ │ │ │ │ ├── FlatSamplerConfig.java │ │ │ │ │ └── FlatSampler.java │ │ │ │ ├── combined │ │ │ │ │ └── CombinedConfig.java │ │ │ │ ├── AbstractSamplerContainerConfig.java │ │ │ │ ├── SamplerModifier.java │ │ │ │ ├── noise │ │ │ │ │ ├── NoiseConfig.java │ │ │ │ │ └── NoiseSampler.java │ │ │ │ ├── AbstractSamplerConfiguration.java │ │ │ │ ├── ChildSamplerConfig.java │ │ │ │ └── acontinent │ │ │ │ │ └── AContinentConfig.java │ │ │ ├── generator │ │ │ │ ├── ChunkListener.java │ │ │ │ └── OpusConfiguration.java │ │ │ ├── noise │ │ │ │ ├── AbstractNoiseAlgorithm.java │ │ │ │ └── Algorithms.java │ │ │ ├── Config.java │ │ │ ├── interpreter │ │ │ │ ├── GreyScaleInterpreter.java │ │ │ │ ├── ColorInterpreterItem.java │ │ │ │ ├── TypeInterpreter.java │ │ │ │ └── ColorInterpreter.java │ │ │ ├── gemoetry │ │ │ │ ├── PointList.java │ │ │ │ ├── scatterer │ │ │ │ │ ├── massspring │ │ │ │ │ │ └── SimplePositionConfig.java │ │ │ │ │ └── AbstractGeometrySampler.java │ │ │ │ └── AbstractGeometryData.java │ │ │ ├── layer │ │ │ │ └── LayerConfig.java │ │ │ ├── exceptions │ │ │ │ ├── SamplerInvalidConfigException.java │ │ │ │ ├── SamplerRecursionException.java │ │ │ │ └── SamplerUnresolvedDependencyException.java │ │ │ ├── MathE.java │ │ │ ├── log │ │ │ │ ├── StandardOut.java │ │ │ │ └── Log.java │ │ │ └── region │ │ │ │ ├── Chunk.java │ │ │ │ └── ChunkRequestBuffer.java │ │ │ └── simpletask │ │ │ └── SimpleThreadFactory.java │ └── build.gradle ├── opusloaderjson │ ├── build.gradle │ └── src │ │ └── com │ │ └── nukethemoon │ │ └── tools │ │ └── opusproto │ │ └── loader │ │ └── json │ │ └── PersistenceOpus.java └── build.gradle ├── .gitignore └── README.md /project/editor/libs/Ani-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/libs/Ani-1.0.0.jar -------------------------------------------------------------------------------- /project/editor/data/img/upIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/upIcon.png -------------------------------------------------------------------------------- /project/editor/data/skin/uiskin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/skin/uiskin.png -------------------------------------------------------------------------------- /project/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.daemon=true 2 | org.gradle.jvmargs=-Xms128m -Xmx512m 3 | org.gradle.configureondemand=true -------------------------------------------------------------------------------- /project/editor/assets/opus_spash.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/assets/opus_spash.psd -------------------------------------------------------------------------------- /project/editor/data/docu/img/chunk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/chunk.jpg -------------------------------------------------------------------------------- /project/editor/data/docu/img/grid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/grid.jpg -------------------------------------------------------------------------------- /project/editor/data/docu/img/layer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/layer.jpg -------------------------------------------------------------------------------- /project/editor/data/docu/raw/chunk.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/raw/chunk.psd -------------------------------------------------------------------------------- /project/editor/data/docu/raw/grid.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/raw/grid.psd -------------------------------------------------------------------------------- /project/editor/data/docu/raw/layer.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/raw/layer.psd -------------------------------------------------------------------------------- /project/editor/data/img/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/background.png -------------------------------------------------------------------------------- /project/editor/data/img/downIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/downIcon.png -------------------------------------------------------------------------------- /project/editor/data/img/icon_flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/icon_flat.png -------------------------------------------------------------------------------- /project/editor/data/img/icon_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/icon_layer.png -------------------------------------------------------------------------------- /project/editor/data/img/icon_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/icon_mask.png -------------------------------------------------------------------------------- /project/editor/data/img/icon_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/icon_noise.png -------------------------------------------------------------------------------- /project/editor/data/img/ntm_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/ntm_logo.png -------------------------------------------------------------------------------- /project/editor/data/img/selectedBG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/selectedBG.png -------------------------------------------------------------------------------- /project/editor/data/skin/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/skin/default.png -------------------------------------------------------------------------------- /project/example/data/chunk_x0_y0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/example/data/chunk_x0_y0.png -------------------------------------------------------------------------------- /project/example/data/chunk_x0_y1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/example/data/chunk_x0_y1.png -------------------------------------------------------------------------------- /project/example/data/chunk_x1_y0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/example/data/chunk_x1_y0.png -------------------------------------------------------------------------------- /project/example/data/chunk_x1_y1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/example/data/chunk_x1_y1.png -------------------------------------------------------------------------------- /project/settings.gradle: -------------------------------------------------------------------------------- 1 | include 'editor', 'opuslib', 'opusloaderjson' 2 | include 'opusloaderjson' 3 | include 'example' 4 | 5 | -------------------------------------------------------------------------------- /project/editor/data/docu/smoothEdge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/smoothEdge.png -------------------------------------------------------------------------------- /project/editor/data/img/background2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/background2.png -------------------------------------------------------------------------------- /project/editor/data/img/background3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/background3.png -------------------------------------------------------------------------------- /project/editor/data/img/icon_islands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/icon_islands.png -------------------------------------------------------------------------------- /project/editor/data/img/opus_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/opus_splash.png -------------------------------------------------------------------------------- /project/example/libs/opuslib-0.0.1a.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/example/libs/opuslib-0.0.1a.jar -------------------------------------------------------------------------------- /project/editor/data/docu/img/opus_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/opus_logo.png -------------------------------------------------------------------------------- /project/editor/data/img/icon_combined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/icon_combined.png -------------------------------------------------------------------------------- /project/editor/data/img/icon_continent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/icon_continent.png -------------------------------------------------------------------------------- /project/editor/data/img/transparentBG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/img/transparentBG.png -------------------------------------------------------------------------------- /project/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /project/editor/data/docu/img/sampler_masked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/sampler_masked.png -------------------------------------------------------------------------------- /project/example/libs/opusloaderjson-0.0.1a.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/example/libs/opusloaderjson-0.0.1a.jar -------------------------------------------------------------------------------- /project/editor/data/docu/img/modifier_sharpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/modifier_sharpen.png -------------------------------------------------------------------------------- /project/editor/data/docu/img/sampler_continent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/sampler_continent.png -------------------------------------------------------------------------------- /project/editor/data/docu/img/sampler_noise_sn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/sampler_noise_sn.png -------------------------------------------------------------------------------- /project/editor/data/docu/img/chunks_datastructure.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/img/chunks_datastructure.jpg -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/js/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/school_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/js/highlight/styles/school_book.png -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/brown_papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aphex-/Opus-Prototype/HEAD/project/editor/data/docu/js/highlight/styles/brown_papersq.png -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandSnapshot.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandSnapshot { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandOpenSaveAs.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandOpenSaveAs { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandSaveProject.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandSaveProject { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandRefreshLayout.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandRefreshLayout { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandOpenAboutWindow.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandOpenAboutWindow { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandOpenWorldEditor.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandOpenWorldEditor { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandSnapshotDelete.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandSnapshotDelete { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandLimitWindowSizes.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandLimitWindowSizes { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandOpenProjectWindow.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandOpenProjectWindow { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandOpenSettingsWindow.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandOpenSettingsWindow { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/layer/EventLayersChanged.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.layer; 2 | 3 | public class EventLayersChanged { 4 | } 5 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/ISeedContainer.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler; 2 | 3 | public interface ISeedContainer { 4 | double getContainingSeed(); 5 | } 6 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/sampler/CommandOpenSamplerList.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.sampler; 2 | 3 | public class CommandOpenSamplerList { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/Notifyable.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler; 2 | 3 | public interface Notifyable { 4 | void notifyChanges(); 5 | } 6 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/sampler/EventSamplerPoolChanged.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.sampler; 2 | 3 | public class EventSamplerPoolChanged { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/interpreter/CommandOpenInterpreterList.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.interpreter; 2 | 3 | public class CommandOpenInterpreterList { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/interpreter/EventInterpreterPoolChanged.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.interpreter; 2 | 3 | public class EventInterpreterPoolChanged { 4 | } 5 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/TreeExpansionListener.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui; 2 | 3 | public interface TreeExpansionListener { 4 | void onExpansion(boolean expanded); 5 | } 6 | -------------------------------------------------------------------------------- /project/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Sep 21 13:08:26 CEST 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-2.4-all.zip 7 | -------------------------------------------------------------------------------- /project/opuslib/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | apply plugin: 'java' 3 | sourceCompatibility = 1.6 4 | targetCompatibility = 1.6 5 | } 6 | 7 | version '0.0.1a' 8 | 9 | [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' 10 | 11 | sourceSets { 12 | main.java.srcDirs = [ "src/" ] 13 | } 14 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/generator/ChunkListener.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.generator; 2 | 3 | import com.nukethemoon.tools.opusproto.region.Chunk; 4 | 5 | public interface ChunkListener { 6 | void onChunkCreated(int regionX, int regionY, Chunk chunk); 7 | } 8 | -------------------------------------------------------------------------------- /project/opusloaderjson/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | apply plugin: 'java' 3 | sourceCompatibility = 1.6 4 | targetCompatibility = 1.6 5 | } 6 | version '0.0.1a' 7 | 8 | sourceSets { 9 | main.java.srcDirs = [ "src/" ] 10 | } 11 | 12 | repositories { 13 | mavenCentral() 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/noise/AbstractNoiseAlgorithm.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.noise; 2 | 3 | public abstract class AbstractNoiseAlgorithm { 4 | 5 | public abstract float[][] createData(float x, float y, int size, double seed, float scale, float resolution); 6 | } 7 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/AbstractMessageWithId.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class AbstractMessageWithId { 4 | 5 | public String id; 6 | 7 | public AbstractMessageWithId(String id) { 8 | this.id = id; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandDrawMap.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandDrawMap extends CommandDrawRectangle { 4 | 5 | public CommandDrawMap(float x1, float y1, float x2, float y2) { 6 | super(x1, y1, x2, y2); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/Config.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto; 2 | 3 | public class Config { 4 | 5 | public static final int MAX_SAMPLER_RECURSION_DEPTH = 20; 6 | public static final String VERSION = "0.0.1a"; 7 | 8 | public static final boolean DEBUG = true; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/formular/noise/algorithm/SimplexConfigForm.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler.formular.noise.algorithm; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 4 | 5 | public class SimplexConfigForm extends Table { 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandShowDependencyWindow.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandShowDependencyWindow extends AbstractMessageWithId { 4 | 5 | 6 | public CommandShowDependencyWindow(String id) { 7 | super(id); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/layer/CommandCreateLayer.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.layer; 2 | 3 | public class CommandCreateLayer { 4 | 5 | public String layerId; 6 | 7 | public CommandCreateLayer(String layerId) { 8 | this.layerId = layerId; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/layer/CommandDeleteLayer.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.layer; 2 | 3 | public class CommandDeleteLayer { 4 | 5 | 6 | public String layerId; 7 | 8 | public CommandDeleteLayer(String layerId) { 9 | this.layerId = layerId; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/interpreter/CommandCreateInterpreter.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.interpreter; 2 | 3 | public class CommandCreateInterpreter { 4 | 5 | public String id; 6 | 7 | public CommandCreateInterpreter(String id) { 8 | this.id = id; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/layer/CommandOpenLayerEditor.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.layer; 2 | 3 | public class CommandOpenLayerEditor { 4 | 5 | public String layerId; 6 | 7 | public CommandOpenLayerEditor(String layerId) { 8 | this.layerId = layerId; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/sampler/CommandDeleteSampler.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.sampler; 2 | 3 | public class CommandDeleteSampler { 4 | 5 | public String samplerId; 6 | 7 | public CommandDeleteSampler(String samplerId) { 8 | this.samplerId = samplerId; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/sampler/EventSamplerUpdated.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.sampler; 2 | 3 | public class EventSamplerUpdated { 4 | 5 | public String samplerId; 6 | 7 | public EventSamplerUpdated(String samplerId) { 8 | this.samplerId = samplerId; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/sampler/CommandOpenSamplerEditor.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.sampler; 2 | 3 | public class CommandOpenSamplerEditor { 4 | 5 | public String samplerId; 6 | 7 | public CommandOpenSamplerEditor(String samplerId) { 8 | this.samplerId = samplerId; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/example/build.gradle: -------------------------------------------------------------------------------- 1 | version '0.0.1a' 2 | 3 | apply plugin: 'java' 4 | 5 | repositories { 6 | mavenCentral() 7 | } 8 | 9 | dependencies { 10 | compile 'com.google.code.gson:gson:2.3' 11 | compile files('libs/opuslib-0.0.1a.jar') 12 | compile files('libs/opusloaderjson-0.0.1a.jar') 13 | } 14 | 15 | sourceSets { 16 | main.java.srcDirs = [ "src/" ] 17 | } -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandGenerateWorld.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandGenerateWorld { 4 | 5 | public boolean force; 6 | 7 | public CommandGenerateWorld() { 8 | this(false); 9 | } 10 | 11 | public CommandGenerateWorld(boolean force) { 12 | this.force = force; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/masked/MaskedSamplerConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler.masked; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerContainerConfig; 4 | 5 | public class MaskedSamplerConfig extends AbstractSamplerContainerConfig { 6 | 7 | public MaskedSamplerConfig(String id) { 8 | super(id); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/interpreter/GreyScaleInterpreter.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.interpreter; 2 | 3 | 4 | 5 | public class GreyScaleInterpreter extends TypeInterpreter { 6 | 7 | 8 | public GreyScaleInterpreter(String id) { 9 | super(id); 10 | } 11 | 12 | @Override 13 | public int getType(float sampleValue) { 14 | return 0; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/sampler/CommandCreateSampler.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.sampler; 2 | 3 | public class CommandCreateSampler { 4 | 5 | public final String name; 6 | public final String type; 7 | 8 | public CommandCreateSampler(String name, String type) { 9 | 10 | this.name = name; 11 | this.type = type; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/app/ExitDialogInterface.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.app; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Stage; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Dialog; 5 | 6 | public interface ExitDialogInterface { 7 | void setExitDialog(Dialog exitDialog, Stage stage); 8 | 9 | void exitConfirmed(); 10 | 11 | void exitCanceled(); 12 | } -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/interpreter/CommandDeleteInterpreter.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.interpreter; 2 | 3 | import com.nukethemoon.tools.opusproto.editor.message.AbstractMessageWithId; 4 | 5 | public class CommandDeleteInterpreter extends AbstractMessageWithId { 6 | 7 | public CommandDeleteInterpreter(String id) { 8 | super(id); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/gemoetry/PointList.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.gemoetry; 2 | 3 | public class PointList extends AbstractGeometryData { 4 | 5 | private float[] points; 6 | 7 | public PointList(String id, double seed, float[] points) { 8 | super(id, seed); 9 | this.points = points; 10 | } 11 | 12 | public float[] getPoints() { 13 | return points; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandSnapshotChangeSettings.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandSnapshotChangeSettings { 4 | 5 | public boolean drawBehind; 6 | public float opacity; 7 | 8 | public CommandSnapshotChangeSettings(boolean drawBehind, float opacity) { 9 | this.drawBehind = drawBehind; 10 | this.opacity = opacity; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/interpreter/ColorInterpreterItem.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.interpreter; 2 | 3 | public class ColorInterpreterItem extends TypeInterpreter.InterpreterItem { 4 | 5 | public float starColorR = 0; 6 | public float starColorG = 0; 7 | public float starColorB = 0; 8 | 9 | public float endColorR = 1; 10 | public float endColorG = 1; 11 | public float endColorB = 1; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/layer/LayerConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.layer; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerContainerConfig; 4 | 5 | /** 6 | * Configuration for a layer. 7 | */ 8 | public class LayerConfig extends AbstractSamplerContainerConfig { 9 | 10 | public String interpreterId; 11 | 12 | public LayerConfig(String id) { 13 | super(id); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandDrawRectangle.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandDrawRectangle { 4 | 5 | public float x1; 6 | public float y1; 7 | public float x2; 8 | public float y2; 9 | 10 | public CommandDrawRectangle(float x1, float y1, float x2, float y2) { 11 | this.x1 = x1; 12 | this.y1 = y1; 13 | this.x2 = x2; 14 | this.y2 = y2; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/flat/FlatSamplerConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler.flat; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 4 | 5 | /** 6 | * The configuration for this sampler. 7 | */ 8 | public class FlatSamplerConfig extends AbstractSamplerConfiguration { 9 | 10 | public float value = 0; 11 | 12 | public FlatSamplerConfig(String id) { 13 | super(id); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/interpreter/CommandOpenInterpreterEditor.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message.interpreter; 2 | 3 | import com.nukethemoon.tools.opusproto.interpreter.ColorInterpreter; 4 | 5 | public class CommandOpenInterpreterEditor { 6 | 7 | public ColorInterpreter interpreter; 8 | 9 | public CommandOpenInterpreterEditor(ColorInterpreter interpreter) { 10 | this.interpreter = interpreter; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandSnapshotBySampler.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandSnapshotBySampler { 4 | 5 | public String id; 6 | public float opacity; 7 | public boolean drawBehind; 8 | 9 | 10 | public CommandSnapshotBySampler(String id, float opacity, boolean drawBehind) { 11 | this.id = id; 12 | this.opacity = opacity; 13 | this.drawBehind = drawBehind; 14 | } 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/exceptions/SamplerInvalidConfigException.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.exceptions; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.AbstractSampler; 4 | 5 | public class SamplerInvalidConfigException extends Exception { 6 | 7 | private AbstractSampler sampler; 8 | 9 | public SamplerInvalidConfigException(String message, AbstractSampler sampler) { 10 | super(message); 11 | this.sampler = sampler; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/gemoetry/scatterer/massspring/SimplePositionConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.gemoetry.scatterer.massspring; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 4 | 5 | public class SimplePositionConfig extends AbstractSamplerConfiguration { 6 | 7 | public float maximumDistance = 49f; 8 | public float gridSize = 100; 9 | 10 | 11 | public SimplePositionConfig(String id) { 12 | super(id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/YesNoDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.Input; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 5 | 6 | public class YesNoDialog extends BaseDialog { 7 | 8 | public YesNoDialog(String text, Skin skin) { 9 | super(text, skin); 10 | 11 | key(Input.Keys.ENTER, true); 12 | key(Input.Keys.ESCAPE, false); 13 | button("Yes", true); 14 | button("No", false); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/combined/CombinedConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler.combined; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerContainerConfig; 4 | import com.nukethemoon.tools.opusproto.sampler.ChildSamplerConfig; 5 | 6 | public class CombinedConfig extends AbstractSamplerContainerConfig { 7 | 8 | public CombinedConfig(String samplerId) { 9 | super(samplerId); 10 | samplerItems = new ChildSamplerConfig[0]; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/ErrorDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 5 | 6 | public class ErrorDialog extends BaseDialog { 7 | 8 | public ErrorDialog(String text, Skin skin) { 9 | super("Error", skin); 10 | getContentTable().defaults().pad(15); 11 | getContentTable().add(new Label(text, skin)); 12 | button("ok", true); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/exceptions/SamplerRecursionException.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.exceptions; 2 | 3 | import com.nukethemoon.tools.opusproto.Config; 4 | 5 | public class SamplerRecursionException extends Exception { 6 | 7 | public SamplerRecursionException(String samplerId) { 8 | super("Failed to load sampler '" + samplerId + "'. Max recursion depth " 9 | + Config.MAX_SAMPLER_RECURSION_DEPTH + " reached. Check for circular dependencies in your project."); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/DesktopLauncher.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.desktop; 2 | 3 | import com.badlogic.gdx.backends.lwjgl.LwjglApplication; 4 | import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; 5 | 6 | public class DesktopLauncher { 7 | public static void main (String[] arg) { 8 | LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); 9 | new LwjglApplication(new com.nukethemoon.tools.opusproto.desktop.MyGdxGame(), config); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/SuccessDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | 4 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 6 | 7 | public class SuccessDialog extends BaseDialog{ 8 | 9 | public SuccessDialog(String text, Skin skin) { 10 | super("Success", skin); 11 | getContentTable().defaults().pad(15); 12 | getContentTable().add(new Label(text, skin)); 13 | button("ok", true); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /project/editor/data/editor_settings.json: -------------------------------------------------------------------------------- 1 | {"windows":[{"x":420,"y":5,"visible":false,"name":"SamplerEditor"},{"x":0,"y":0,"visible":true,"name":"LayerEditor"},{"x":0,"y":0,"visible":false,"name":"WorldEditor"},{"x":605,"y":30,"visible":false,"name":"SamplerOverview"},{"x":1,"y":0,"visible":false,"name":"ProjectWindow"},{"x":0,"y":0,"visible":false,"name":"ColorInterpreterList"},{"x":0,"y":0,"visible":false,"name":"SettingsWindow"},{"x":0,"y":0,"visible":false,"name":"AboutWindow"}],"screenWidth":1396,"screenHeight":807,"autoRefresh":false,"showExitDialog":true} -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/AbstractSamplerContainerConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler; 2 | 3 | public abstract class AbstractSamplerContainerConfig extends AbstractSamplerConfiguration { 4 | 5 | public ChildSamplerConfig[] samplerItems; 6 | 7 | public AbstractSamplerContainerConfig(String id) { 8 | super(id); 9 | samplerItems = new ChildSamplerConfig[0]; 10 | } 11 | 12 | 13 | public ChildSamplerConfig[] getChildSamplerConfigs() { 14 | return samplerItems; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/gemoetry/AbstractGeometryData.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.gemoetry; 2 | 3 | public abstract class AbstractGeometryData { 4 | 5 | private final String creatorId; 6 | private final double seed; 7 | 8 | public AbstractGeometryData(String creatorId, double seed) { 9 | this.creatorId = creatorId; 10 | this.seed = seed; 11 | } 12 | 13 | 14 | public boolean isBasedOn(String creatorId, double seed) { 15 | return creatorId.equals(this.creatorId) && seed == this.seed; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/generator/OpusConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.generator; 2 | 3 | public class OpusConfiguration { 4 | 5 | public OpusConfiguration() { 6 | layerIds = new String[0]; 7 | } 8 | 9 | public String seedString; 10 | 11 | public int chunkSize = 30; 12 | public int chunkOverlap = 0; 13 | 14 | public String name; 15 | public String[] layerIds; 16 | 17 | public boolean bufferChunks = true; 18 | public boolean bufferLayers = true; 19 | 20 | public transient double seed; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/SamplerModifier.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler; 2 | 3 | public class SamplerModifier { 4 | 5 | public final Type type; 6 | public final float value; 7 | 8 | public enum Type { 9 | Multiply, 10 | Add, 11 | Max, 12 | Min, 13 | Step, 14 | Limit, 15 | Sharpen, 16 | Sin, 17 | Pow, 18 | HigherThan, 19 | LowerThan, 20 | Invert 21 | 22 | } 23 | 24 | public SamplerModifier(Type type, float value) { 25 | this.type = type; 26 | this.value = value; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/message/CommandRenameElement.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.message; 2 | 3 | public class CommandRenameElement { 4 | 5 | public String oldName; 6 | public String newName; 7 | public ElementType type; 8 | 9 | public CommandRenameElement(String oldName, String newName, ElementType type) { 10 | this.oldName = oldName; 11 | this.newName = newName; 12 | this.type = type; 13 | } 14 | 15 | public enum ElementType { 16 | Sampler, 17 | Layer, 18 | World, 19 | Interpreter 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/noise/NoiseConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler.noise; 2 | 3 | import com.nukethemoon.tools.opusproto.noise.Algorithms; 4 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 5 | 6 | /** 7 | * The configuration for this sampler. 8 | */ 9 | public class NoiseConfig extends AbstractSamplerConfiguration { 10 | 11 | public String noiseAlgorithmName; 12 | 13 | public NoiseConfig(String id) { 14 | super(id); 15 | this.noiseAlgorithmName = Algorithms.NAME_SIMPLEX; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/AbstractSamplerConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public abstract class AbstractSamplerConfiguration { 7 | 8 | public String id; 9 | public double worldSeedModifier; 10 | public float scale; 11 | public List modifiers; 12 | 13 | public AbstractSamplerConfiguration(String id) { 14 | this.id = id; 15 | scale = 1; 16 | worldSeedModifier = 0; 17 | modifiers = new ArrayList(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/MathE.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto; 2 | 3 | 4 | public class MathE { 5 | 6 | 7 | public static boolean isPointInRect(float x, float y, float recX01, float recY01, float recX02, float recY02) { 8 | float recLeft = ((recX01 < recX02) ? recX01 : recX02); 9 | float recRight = ((recX01 > recX02) ? recX01 : recX02); 10 | float recBottom = ((recY01 < recY02) ? recY01 : recY02); 11 | float recTop = ((recY01 > recY02) ? recY01 : recY02); 12 | return (x >= recLeft) && (x < recRight) && (y >= recBottom) && (y < recTop); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/log/StandardOut.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.log; 2 | 3 | 4 | public class StandardOut implements Log.Out { 5 | 6 | @Override 7 | public void logError(String tag, String message) { 8 | System.out.println("Error: " + tag + " " + message); 9 | } 10 | 11 | @Override 12 | public void logInfo(String tag, String message) { 13 | System.out.println("Info: " + tag + " " + message); 14 | } 15 | 16 | @Override 17 | public void logDebug(String tag, String message) { 18 | System.out.println("Debug: " + tag + " " + message); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /project/editor/data/docu/layer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layer 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Layer

15 | 16 |

17 | A Layer contains one or more MaskedSampler and an Interpreter 18 | 19 |

20 | 21 | 22 | -------------------------------------------------------------------------------- /project/editor/data/docu/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Overview 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Overview

15 | 16 |

Sampler

17 |

Modifier

18 |

Layer

19 |

Interpreter

20 | 21 | 22 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/NewInterpreterDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 4 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 5 | import com.nukethemoon.tools.opusproto.editor.message.interpreter.CommandCreateInterpreter; 6 | 7 | public class NewInterpreterDialog extends NewLayerDialog { 8 | 9 | public NewInterpreterDialog(Skin skin) { 10 | super(skin); 11 | } 12 | 13 | @Override 14 | protected void result(Object object) { 15 | if ((Boolean) object) { 16 | Editor.post(new CommandCreateInterpreter(nameTextField.getText())); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /project/editor/data/docu/interpreter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Interpreter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Interpreter

15 | 16 |

17 | An Interpreter helps to map a value of a Sampler to 18 | another value. If you want to render the output of a Sampler you usually want to 19 | map the values to color ranges. 20 |

21 | 22 | 23 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/Config.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor; 2 | 3 | public class Config { 4 | 5 | public static String NAME = "OPUS prototype"; 6 | 7 | public static String VERSION = "0.0.1a"; 8 | 9 | public static String NTM_URL = "http://www.nuke-the-moon.com"; 10 | 11 | public static boolean DEBUG = true; 12 | 13 | public static String PROJECT_PATH = "data/worlds/"; 14 | public static String SAVE_FILE_NAME = "/save.json"; 15 | 16 | public static String SETTINGS_FILE = "data/editor_settings.json"; 17 | public static String IMAGE_PATH_SPLASH = "data/img/opus_splash.png"; 18 | public static String IMAGE_PATH = "data/img/"; 19 | public static String SKIN_PATH = "data/skin/uiskin.json"; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/ChildSamplerConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler; 2 | 3 | /** 4 | * Configuration for a combined sampler item. 5 | */ 6 | public class ChildSamplerConfig { 7 | public String samplerReferenceId; 8 | public Operator operator = Operator.Plus; 9 | public boolean invert = false; 10 | public boolean active = true; // for debug 11 | 12 | public float scaleModifier = 1.0f; 13 | public double seedModifier = 0f; 14 | public float multiply = 1f; 15 | 16 | public ChildSamplerConfig(String samplerReferenceId) { 17 | this.samplerReferenceId = samplerReferenceId; 18 | } 19 | 20 | public enum Operator { 21 | Plus, 22 | Minus, 23 | Mix, 24 | And, 25 | Or, 26 | Highest, 27 | Lowest 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/acontinent/AContinentConfig.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler.acontinent; 2 | 3 | import com.nukethemoon.tools.opusproto.noise.Algorithms; 4 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 5 | 6 | public class AContinentConfig extends AbstractSamplerConfiguration { 7 | 8 | public float size = 0.5f; 9 | public float edge = 0.05f; 10 | 11 | public int iterations = 4; 12 | public float growth = 2f; 13 | 14 | public String noiseAlgorithmName; 15 | 16 | public boolean smoothEdge = false; 17 | 18 | public AContinentConfig(String id) { 19 | super(id); 20 | this.scale = 5; 21 | this.noiseAlgorithmName = Algorithms.NAME_SIMPLEX; 22 | this.worldSeedModifier = 0; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/MyGdxGame.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.desktop; 2 | 3 | import com.badlogic.gdx.ApplicationAdapter; 4 | import com.badlogic.gdx.Gdx; 5 | import com.badlogic.gdx.graphics.GL20; 6 | import com.badlogic.gdx.graphics.Texture; 7 | import com.badlogic.gdx.graphics.g2d.SpriteBatch; 8 | 9 | public class MyGdxGame extends ApplicationAdapter { 10 | SpriteBatch batch; 11 | Texture img; 12 | 13 | @Override 14 | public void create () { 15 | batch = new SpriteBatch(); 16 | img = new Texture("badlogic.jpg"); 17 | } 18 | 19 | @Override 20 | public void render () { 21 | Gdx.gl.glClearColor(1, 0, 0, 1); 22 | Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); 23 | batch.begin(); 24 | batch.draw(img, 0, 0); 25 | batch.end(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/exceptions/SamplerUnresolvedDependencyException.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.exceptions; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerContainerConfig; 4 | 5 | import java.util.List; 6 | 7 | public class SamplerUnresolvedDependencyException extends Exception { 8 | 9 | public SamplerUnresolvedDependencyException(List notLoadable) { 10 | super(createMessage(notLoadable)); 11 | } 12 | 13 | private static String createMessage(List notLoadable) { 14 | String message = "Can not load dependencies for the samplers: "; 15 | for (AbstractSamplerContainerConfig c : notLoadable) { 16 | message += c.id + " "; 17 | } 18 | message += "."; 19 | return message; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /project/editor/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "java" 2 | 3 | sourceCompatibility = 1.6 4 | 5 | project.ext.mainClassName = "com.nukethemoon.tools.opusproto.editor.Editor" 6 | project.ext.assetsDir = new File("assets"); 7 | 8 | task run(dependsOn: classes, type: JavaExec) { 9 | main = project.mainClassName 10 | classpath = sourceSets.main.runtimeClasspath 11 | standardInput = System.in 12 | workingDir = project.assetsDir 13 | ignoreExitValue = true 14 | } 15 | 16 | task dist(type: Jar) { 17 | from files(sourceSets.main.output.classesDir) 18 | from files(sourceSets.main.output.resourcesDir) 19 | from {configurations.compile.collect {zipTree(it)}} 20 | from files(project.assetsDir); 21 | 22 | manifest { 23 | attributes 'Main-Class': project.mainClassName 24 | } 25 | } 26 | 27 | dist.dependsOn classes 28 | 29 | sourceSets { 30 | main.java.srcDirs = [ "src/" ] 31 | } 32 | -------------------------------------------------------------------------------- /project/opusloaderjson/src/com/nukethemoon/tools/opusproto/loader/json/PersistenceOpus.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.loader.json; 2 | 3 | import com.google.gson.JsonElement; 4 | import com.nukethemoon.tools.opusproto.generator.OpusConfiguration; 5 | import com.nukethemoon.tools.opusproto.interpreter.ColorInterpreter; 6 | import com.nukethemoon.tools.opusproto.layer.LayerConfig; 7 | 8 | 9 | public class PersistenceOpus { 10 | 11 | public String version; 12 | 13 | public SamplerConfigEntry[] samplerConfigs; 14 | 15 | public ColorInterpreter[] interpreters; 16 | 17 | public LayerConfig[] layerConfigs; 18 | 19 | public OpusConfiguration worldConfig; 20 | 21 | 22 | public static class SamplerConfigEntry { 23 | public String type; 24 | public JsonElement data; 25 | 26 | public SamplerConfigEntry(String type, JsonElement configJson) { 27 | this.type = type; 28 | this.data = configJson; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-number { 16 | color: #6897BB; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-deletion { 21 | color: #cc7832; 22 | } 23 | 24 | .hljs-comment { 25 | color: #808080; 26 | } 27 | 28 | .hljs-annotation { 29 | color: #bbb529; 30 | } 31 | 32 | .hljs-string, 33 | .hljs-addition { 34 | color: #6A8759; 35 | } 36 | 37 | .hljs-function .hljs-title, 38 | .hljs-change { 39 | color: #ffc66d; 40 | } 41 | 42 | .hljs-tag .hljs-title, 43 | .hljs-doctype { 44 | color: #e8bf6a; 45 | } 46 | 47 | .hljs-tag .hljs-attribute { 48 | color: #bababa; 49 | } 50 | 51 | .hljs-tag .hljs-value { 52 | color: #a5c261; 53 | } 54 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/BaseDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Dialog; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 5 | 6 | 7 | public abstract class BaseDialog extends Dialog { 8 | 9 | public String resultValue; 10 | protected ResultListener listener; 11 | 12 | public BaseDialog(String title, Skin skin) { 13 | super(title, skin); 14 | 15 | } 16 | 17 | public void setResultListener(ResultListener listener) { 18 | this.listener = listener; 19 | } 20 | 21 | @Override 22 | protected void result(Object object) { 23 | super.result(object); 24 | if (listener != null) { 25 | Boolean success = (Boolean)object; 26 | if (success) { 27 | listener.onResult(resultValue); 28 | } 29 | } 30 | } 31 | 32 | public interface ResultListener { 33 | void onResult(Object result); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/RenameDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 5 | import com.badlogic.gdx.scenes.scene2d.ui.TextField; 6 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 7 | 8 | 9 | public class RenameDialog extends BaseDialog { 10 | 11 | public RenameDialog(Skin skin, String oldName) { 12 | super("Rename", skin); 13 | getContentTable().defaults().pad(14); 14 | final TextField renameTextField = new TextField(oldName, skin); 15 | renameTextField.addListener(new ChangeListener() { 16 | @Override 17 | public void changed(ChangeEvent event, Actor actor) { 18 | resultValue = renameTextField.getText(); 19 | } 20 | }); 21 | getContentTable().add(renameTextField); 22 | 23 | button("OK", true); 24 | button("cancel", false); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/gemoetry/scatterer/AbstractGeometrySampler.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.gemoetry.scatterer; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.Samplers; 4 | import com.nukethemoon.tools.opusproto.gemoetry.AbstractGeometryData; 5 | import com.nukethemoon.tools.opusproto.noise.Algorithms; 6 | import com.nukethemoon.tools.opusproto.sampler.AbstractSampler; 7 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 8 | 9 | public abstract class AbstractGeometrySampler extends AbstractSampler { 10 | 11 | 12 | public AbstractGeometrySampler(AbstractSamplerConfiguration config, 13 | double worldSeed, Algorithms noisePool, 14 | Samplers samplers) { 15 | super(config, worldSeed, noisePool, samplers); 16 | } 17 | 18 | 19 | public abstract AbstractGeometryData createGeometries( 20 | float x, float y, float width, float height, double seed); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/interpreter/TypeInterpreter.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.interpreter; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class TypeInterpreter { 7 | 8 | public String id; 9 | public List it = new ArrayList(); 10 | 11 | public TypeInterpreter(String id) { 12 | this.id = id; 13 | } 14 | 15 | public int getType(float sampleValue) { 16 | for (int i = 0; i < it.size(); i++) { 17 | InterpreterItem item = it.get(i); 18 | if (sampleValue >= item.startValue && sampleValue <= item.endValue) { 19 | return i; 20 | } 21 | } 22 | return -1; 23 | } 24 | 25 | public int getTypeCount() { 26 | return it.size(); 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return id; 32 | } 33 | 34 | public static class InterpreterItem { 35 | public float startValue = 0; 36 | public float endValue = 1; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Java 2 | 3 | *.class 4 | *.war 5 | *.ear 6 | hs_err_pid* 7 | 8 | ## GWT 9 | war/ 10 | html/war/gwt_bree/ 11 | html/gwt-unitCache/ 12 | .apt_generated/ 13 | html/war/WEB-INF/deploy/ 14 | html/war/WEB-INF/classes/ 15 | .gwt/ 16 | gwt-unitCache/ 17 | www-test/ 18 | .gwt-tmp/ 19 | 20 | ## Android Studio and Intellij and Android in general 21 | android/libs/armeabi/ 22 | android/libs/armeabi-v7a/ 23 | android/libs/x86/ 24 | android/gen/ 25 | .idea/ 26 | *.ipr 27 | *.iws 28 | *.iml 29 | out/ 30 | com_crashlytics_export_strings.xml 31 | 32 | ## Eclipse 33 | .classpath 34 | .project 35 | .metadata 36 | **/bin/ 37 | tmp/ 38 | *.tmp 39 | *.bak 40 | *.swp 41 | *~.nib 42 | local.properties 43 | .settings/ 44 | .loadpath 45 | .externalToolBuilders/ 46 | *.launch 47 | 48 | ## NetBeans 49 | **/nbproject/private/ 50 | build/ 51 | nbbuild/ 52 | dist/ 53 | nbdist/ 54 | nbactions.xml 55 | nb-configuration.xml 56 | 57 | ## Gradle 58 | 59 | .gradle 60 | gradle-app.setting 61 | build/ 62 | 63 | ## OS Specific 64 | .DS_Store 65 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/simpletask/SimpleThreadFactory.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.simpletask; 2 | 3 | import java.util.concurrent.ThreadFactory; 4 | import java.util.concurrent.atomic.AtomicInteger; 5 | 6 | 7 | public class SimpleThreadFactory implements ThreadFactory { 8 | 9 | private final int threadPriority; 10 | private final boolean daemon; 11 | private static final AtomicInteger poolNumber = new AtomicInteger(1); 12 | private final AtomicInteger threadNumber = new AtomicInteger(1); 13 | private final String namePrefix; 14 | 15 | 16 | public SimpleThreadFactory(int threadPriority, boolean daemon) { 17 | this.threadPriority = threadPriority; 18 | this.daemon = daemon; 19 | namePrefix = "pool-" +poolNumber.getAndIncrement() + "-thread-"; 20 | 21 | } 22 | 23 | @Override 24 | public Thread newThread(Runnable r) { 25 | Thread thread = new Thread(r, namePrefix + threadNumber.getAndIncrement()); 26 | thread.setDaemon(daemon); 27 | thread.setPriority(threadPriority); 28 | return thread; 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/log/Log.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.log; 2 | 3 | public class Log { 4 | 5 | public static Out out = new StandardOut(); 6 | public static LogType logLevel = LogType.Info; 7 | 8 | public static void i(Class source, String message) { 9 | if (out != null && logLevel == LogType.Info) { 10 | out.logInfo(source.getSimpleName(), message); 11 | } 12 | } 13 | public static void d(Class source, String message) { 14 | if (out != null && (logLevel == LogType.Info || logLevel == LogType.Debug)) { 15 | out.logDebug(source.getSimpleName(), message); 16 | } 17 | } 18 | public static void e(Class source, String message) { 19 | if (out != null) { 20 | out.logError(source.getSimpleName(), message); 21 | } 22 | } 23 | 24 | public interface Out { 25 | void logError(String tag, String message); 26 | void logInfo(String tag, String message); 27 | void logDebug(String tag, String message); 28 | } 29 | 30 | public enum LogType { 31 | Error, 32 | Info, 33 | Debug 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/SaveAsDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 6 | import com.badlogic.gdx.scenes.scene2d.ui.TextField; 7 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 8 | 9 | public class SaveAsDialog extends BaseDialog { 10 | 11 | public SaveAsDialog(Skin skin) { 12 | super("save as..", skin); 13 | getContentTable().pad(15); 14 | 15 | Label nameLabel = new Label("Name:", skin); 16 | getContentTable().add(nameLabel); 17 | 18 | final TextField textField = new TextField("", skin); 19 | textField.addListener(new ChangeListener() { 20 | @Override 21 | public void changed(ChangeEvent event, Actor actor) { 22 | resultValue = textField.getText(); 23 | } 24 | }); 25 | getContentTable().add(textField); 26 | 27 | button("save", true); 28 | button("cancel", false); 29 | pack(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-string, 17 | .hljs-tag .hljs-value, 18 | .hljs-filter .hljs-argument, 19 | .hljs-addition, 20 | .hljs-change, 21 | .hljs-name, 22 | .apache .hljs-tag, 23 | .apache .hljs-cbracket, 24 | .nginx .hljs-built_in, 25 | .tex .hljs-formula { 26 | color: #888; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-shebang, 31 | .hljs-doctype, 32 | .hljs-pi, 33 | .hljs-deletion, 34 | .apache .hljs-sqbracket { 35 | color: #ccc; 36 | } 37 | 38 | .hljs-keyword, 39 | .hljs-tag .hljs-title, 40 | .ini .hljs-title, 41 | .lisp .hljs-title, 42 | .http .hljs-title, 43 | .nginx .hljs-title, 44 | .css .hljs-tag, 45 | .hljs-winutils, 46 | .hljs-flow, 47 | .apache .hljs-tag, 48 | .tex .hljs-command, 49 | .hljs-request, 50 | .hljs-status { 51 | font-weight: bold; 52 | } 53 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/NewLayerDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 5 | import com.badlogic.gdx.scenes.scene2d.ui.TextField; 6 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 7 | import com.nukethemoon.tools.opusproto.editor.message.layer.CommandCreateLayer; 8 | 9 | public class NewLayerDialog extends BaseDialog { 10 | 11 | protected final TextField nameTextField; 12 | 13 | public NewLayerDialog(Skin skin) { 14 | super("Create", skin); 15 | getContentTable().defaults().pad(15); 16 | 17 | Label nameLabel = new Label("Name:", skin); 18 | getContentTable().add(nameLabel); 19 | 20 | nameTextField = new TextField("", skin); 21 | getContentTable().add(nameTextField); 22 | 23 | button("create", true); 24 | button("cancel", false); 25 | } 26 | 27 | @Override 28 | protected void result(Object object) { 29 | super.result(object); 30 | if ((Boolean) object) { 31 | Editor.post(new CommandCreateLayer(nameTextField.getText())); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/menu/tables/HelpTable.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.menu.tables; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 4 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 5 | import com.nukethemoon.tools.opusproto.editor.message.CommandOpenAboutWindow; 6 | 7 | public class HelpTable extends AbstractMenuTable { 8 | 9 | public HelpTable(Skin skin) { 10 | super(skin, "help"); 11 | 12 | final MenuButton docuButton = new MenuButton("docu", skin); 13 | docuButton.setClickListener(new MenuButton.MenuButtonClickListener() { 14 | @Override 15 | public void onClick() { 16 | Editor.openHelp("data/docu/index.html"); 17 | } 18 | }); 19 | 20 | contentTable.add(docuButton).expand().left().fill(); 21 | contentTable.row(); 22 | 23 | MenuButton aboutButton = new MenuButton("about", skin); 24 | aboutButton.setClickListener(new MenuButton.MenuButtonClickListener() { 25 | @Override 26 | public void onClick() { 27 | Editor.post(new CommandOpenAboutWindow()); 28 | } 29 | }); 30 | contentTable.add(aboutButton).expand().left().fill(); 31 | pack(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/windows/ClosableWindow.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.windows; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 5 | import com.badlogic.gdx.scenes.scene2d.ui.TextButton; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Window; 7 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 8 | 9 | public abstract class ClosableWindow extends Window { 10 | 11 | private WindowCloseListener closeListener; 12 | 13 | public ClosableWindow(String title, Skin skin) { 14 | super(title, skin); 15 | final TextButton closeButton = new TextButton("x", skin); 16 | closeButton.addListener(new ChangeListener() { 17 | @Override 18 | public void changed(ChangeEvent event, Actor actor) { 19 | if (closeListener != null) { 20 | closeListener.onClose(); 21 | } 22 | setVisible(false); 23 | } 24 | }); 25 | getTitleTable().add(closeButton).height(18); 26 | } 27 | 28 | 29 | public void setCloseListener(WindowCloseListener listener) { 30 | this.closeListener = listener; 31 | } 32 | 33 | public interface WindowCloseListener { 34 | void onClose(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; 6 | overflow-x: auto; 7 | padding: 0.5em; 8 | background: #eaeef3; 9 | -webkit-text-size-adjust: none; 10 | } 11 | 12 | .hljs, 13 | .hljs-list .hljs-built_in { 14 | color: #00193a; 15 | } 16 | 17 | .hljs-keyword, 18 | .hljs-title, 19 | .hljs-important, 20 | .hljs-request, 21 | .hljs-header, 22 | .hljs-doctag { 23 | font-weight: bold; 24 | } 25 | 26 | .hljs-comment, 27 | .hljs-chunk { 28 | color: #738191; 29 | } 30 | 31 | .hljs-string, 32 | .hljs-title, 33 | .hljs-parent, 34 | .hljs-built_in, 35 | .hljs-literal, 36 | .hljs-filename, 37 | .hljs-value, 38 | .hljs-addition, 39 | .hljs-tag, 40 | .hljs-argument, 41 | .hljs-link_label, 42 | .hljs-blockquote, 43 | .hljs-header, 44 | .hljs-name { 45 | color: #0048ab; 46 | } 47 | 48 | .hljs-decorator, 49 | .hljs-prompt, 50 | .hljs-subst, 51 | .hljs-symbol, 52 | .hljs-doctype, 53 | .hljs-regexp, 54 | .hljs-preprocessor, 55 | .hljs-pragma, 56 | .hljs-pi, 57 | .hljs-attribute, 58 | .hljs-attr_selector, 59 | .hljs-xmlDocTag, 60 | .hljs-deletion, 61 | .hljs-shebang, 62 | .hljs-string .hljs-variable, 63 | .hljs-link_url, 64 | .hljs-bullet, 65 | .hljs-sqbracket, 66 | .hljs-phony { 67 | color: #4c81c9; 68 | } 69 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/menu/tables/FileTable.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.menu.tables; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 4 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 5 | import com.nukethemoon.tools.opusproto.editor.message.CommandOpenSaveAs; 6 | import com.nukethemoon.tools.opusproto.editor.message.CommandSaveProject; 7 | 8 | public class FileTable extends AbstractMenuTable { 9 | 10 | public FileTable(Skin skin) { 11 | super(skin, "file"); 12 | 13 | final MenuButton saveButton = new MenuButton("save", skin); 14 | saveButton.setClickListener(new MenuButton.MenuButtonClickListener() { 15 | @Override 16 | public void onClick() { 17 | Editor.post(new CommandSaveProject()); 18 | handleClose(); 19 | } 20 | }); 21 | 22 | contentTable.add(saveButton).expand().left().fill(); 23 | contentTable.row(); 24 | 25 | MenuButton exportButton = new MenuButton("save as ..", skin); 26 | exportButton.setClickListener(new MenuButton.MenuButtonClickListener() { 27 | @Override 28 | public void onClick() { 29 | Editor.post(new CommandOpenSaveAs()); 30 | handleClose(); 31 | } 32 | }); 33 | contentTable.add(exportButton).expand().left().fill(); 34 | pack(); 35 | } 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/noise/Algorithms.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.noise; 2 | 3 | import com.nukethemoon.tools.opusproto.noise.algorithms.CellNoise; 4 | import com.nukethemoon.tools.opusproto.noise.algorithms.DiamondSquare; 5 | import com.nukethemoon.tools.opusproto.noise.algorithms.SimplexNoise; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | public class Algorithms { 11 | 12 | private Map noiseAlgorithms; 13 | 14 | public static final String NAME_SIMPLEX = SimplexNoise.class.getSimpleName(); 15 | public static final String NAME_DIAMOND_SQUARE = DiamondSquare.class.getSimpleName(); 16 | public static final String NAME_CELL_NOISE = CellNoise.class.getSimpleName(); 17 | 18 | public Algorithms() { 19 | noiseAlgorithms = new HashMap(); 20 | noiseAlgorithms.put(NAME_SIMPLEX, new SimplexNoise()); 21 | noiseAlgorithms.put(NAME_DIAMOND_SQUARE, new DiamondSquare()); 22 | noiseAlgorithms.put(NAME_CELL_NOISE, new CellNoise(this)); 23 | } 24 | 25 | public AbstractNoiseAlgorithm getAlgorithm(String name) { 26 | return noiseAlgorithms.get(name); 27 | } 28 | 29 | public void addAlgorithm(String name, AbstractNoiseAlgorithm algorithm) { 30 | noiseAlgorithms.put(name, algorithm); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/app/EditorApplication.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.app; 2 | 3 | import com.badlogic.gdx.ApplicationListener; 4 | import com.badlogic.gdx.backends.lwjgl.LwjglApplication; 5 | import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; 6 | import com.badlogic.gdx.scenes.scene2d.Stage; 7 | import com.badlogic.gdx.scenes.scene2d.ui.Dialog; 8 | 9 | public class EditorApplication extends LwjglApplication implements ExitDialogInterface { 10 | 11 | private Stage stage; 12 | private Dialog exitDialog; 13 | private boolean showingConfirmDialog = false; 14 | 15 | public EditorApplication(ApplicationListener listener, LwjglApplicationConfiguration config) { 16 | super(listener, config); 17 | } 18 | 19 | @Override 20 | public void exit() { 21 | if (exitDialog == null || stage == null) { 22 | super.exit(); 23 | } else if (!showingConfirmDialog) { 24 | showingConfirmDialog = true; 25 | postRunnable(new Runnable() { 26 | @Override 27 | public void run() { 28 | exitDialog.show(stage); 29 | } 30 | }); 31 | } 32 | } 33 | 34 | @Override 35 | public void setExitDialog(Dialog exitDialog, Stage stage) { 36 | this.exitDialog = exitDialog; 37 | this.stage = stage; 38 | } 39 | 40 | @Override 41 | public void exitConfirmed() { 42 | super.exit(); 43 | } 44 | 45 | @Override 46 | public void exitCanceled() { 47 | showingConfirmDialog = false; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/menu/tables/InfoTable.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.menu.tables; 2 | 3 | import com.badlogic.gdx.graphics.Color; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 7 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 8 | 9 | public class InfoTable extends Table { 10 | 11 | private final Label positionLabelX; 12 | private final Label positionLabelY; 13 | private final Label tileValueLabel; 14 | 15 | public InfoTable(Skin skin) { 16 | super(skin); 17 | top().left(); 18 | setBackground(Styles.INNER_BACKGROUND); 19 | 20 | add(new Label("x", skin)); 21 | positionLabelX = new Label("", skin); 22 | positionLabelX.setColor(Color.LIGHT_GRAY); 23 | add(positionLabelX).left().width(45); 24 | 25 | add(new Label("y", skin)); 26 | positionLabelY = new Label("", skin); 27 | positionLabelY.setColor(Color.LIGHT_GRAY); 28 | add(positionLabelY).left().width(45); 29 | 30 | add(new Label("v", skin)); 31 | tileValueLabel = new Label("", skin); 32 | tileValueLabel.setColor(Color.LIGHT_GRAY); 33 | add(tileValueLabel).left().width(60); 34 | pack(); 35 | } 36 | 37 | public void setHoverValue(int x, int y, float value) { 38 | positionLabelX.setText(x + ""); 39 | positionLabelY.setText(y + ""); 40 | tileValueLabel.setText(String.format("%.3f", value)); 41 | pack(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/UpDownElement.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 7 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 8 | 9 | public class UpDownElement extends Table { 10 | 11 | private ButtonClickListener listener; 12 | 13 | public UpDownElement(Skin skin) { 14 | super(skin); 15 | left().top(); 16 | ImageButton upButton = new ImageButton(Styles.ICON_UP); 17 | upButton.addListener(new ChangeListener() { 18 | @Override 19 | public void changed(ChangeEvent event, Actor actor) { 20 | if (listener != null) { 21 | listener.onUp(); 22 | } 23 | } 24 | }); 25 | add(upButton).size(25, 14).top(); 26 | row(); 27 | 28 | ImageButton downButton = new ImageButton(Styles.ICON_DOWN); 29 | downButton.addListener(new ChangeListener() { 30 | @Override 31 | public void changed(ChangeEvent event, Actor actor) { 32 | if (listener != null) { 33 | listener.onDown(); 34 | } 35 | } 36 | }); 37 | add(downButton).size(25, 14).bottom(); 38 | pack(); 39 | } 40 | 41 | public void setListener(ButtonClickListener listener) { 42 | this.listener = listener; 43 | } 44 | 45 | public interface ButtonClickListener { 46 | void onDown(); 47 | void onUp(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/Settings.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor; 2 | 3 | import com.badlogic.gdx.Gdx; 4 | import com.badlogic.gdx.files.FileHandle; 5 | import com.google.gson.Gson; 6 | 7 | import java.nio.charset.StandardCharsets; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | public class Settings { 12 | 13 | public List windows = new ArrayList(); 14 | 15 | public int screenWidth = 800; 16 | public int screenHeight = 800; 17 | 18 | public boolean autoRefresh = false; 19 | 20 | public boolean showExitDialog = true; 21 | public String openProject = null; 22 | 23 | public static class WindowSetting { 24 | public int x; 25 | public int y; 26 | public boolean visible = true; 27 | public String name; 28 | } 29 | 30 | 31 | public static void save(Settings settings, String path) { 32 | Gson gson = new Gson(); 33 | String settingsJson = gson.toJson(settings); 34 | byte[] layerBytes = settingsJson.getBytes(StandardCharsets.UTF_8); 35 | FileHandle layerFile = Gdx.files.local(path); 36 | layerFile.writeBytes(layerBytes, false); 37 | } 38 | 39 | public static Settings load(String path) { 40 | Gson gson = new Gson(); 41 | FileHandle settingsFile = Gdx.files.local(path); 42 | if (settingsFile.exists()) { 43 | String str = new String(settingsFile.readBytes(), StandardCharsets.UTF_8); 44 | Settings config = gson.fromJson(str, Settings.class); 45 | return config; 46 | } 47 | return new Settings(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/RangeTable.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler; 2 | 3 | import com.badlogic.gdx.graphics.Color; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 7 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 8 | 9 | public class RangeTable extends Table { 10 | 11 | private Label lowValue; 12 | private Label highLabel; 13 | 14 | public RangeTable(Skin skin) { 15 | super(skin); 16 | setBackground(Styles.INNER_BACKGROUND); 17 | 18 | Label titleLabel = new Label("range:", skin); 19 | add(titleLabel).left(); 20 | 21 | lowValue = new Label("", skin); 22 | add(lowValue); 23 | 24 | Label toLabel = new Label("to", skin); 25 | add(toLabel); 26 | 27 | highLabel = new Label("", skin); 28 | add(highLabel); 29 | } 30 | 31 | public void setRange(float low, float high) { 32 | lowValue.setText(String.format("%.3f", low)); 33 | setValueColor(lowValue, low); 34 | highLabel.setText(String.format("%.3f", high)); 35 | setValueColor(highLabel, high); 36 | } 37 | 38 | private void setValueColor(Label label, float value) { 39 | if (value < 0) { 40 | label.setColor(Color.GREEN); 41 | return; 42 | } 43 | if (value > 1) { 44 | label.setColor(Color.RED); 45 | return; 46 | } 47 | if (value == 1 || value == 0) { 48 | label.setColor(Color.WHITE); 49 | return; 50 | } 51 | label.setColor(Color.LIGHT_GRAY); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/interpreter/ColorInterpreter.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.interpreter; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class ColorInterpreter extends TypeInterpreter { 7 | 8 | public List items = new ArrayList(); 9 | 10 | public ColorInterpreter(String id) { 11 | super(id); 12 | ColorInterpreterItem item = new ColorInterpreterItem(); 13 | items.add(item); 14 | } 15 | 16 | @Override 17 | public int getType(float sampleValue) { 18 | for (ColorInterpreterItem item : items) { 19 | if (sampleValue >= item.startValue && sampleValue <= item.endValue) { 20 | float colorScale = (sampleValue - item.startValue) / (item.endValue - item.startValue); 21 | float resultR = item.starColorR + (Math.abs(item.endColorR - item.starColorR) * colorScale); 22 | float resultG = item.starColorG + (Math.abs(item.endColorG - item.starColorG) * colorScale); 23 | float resultB = item.starColorB + (Math.abs(item.endColorB - item.starColorB) * colorScale); 24 | // returns the rgb888 color value 25 | return ((int) (resultR * 255) << 16) | ((int) (resultG * 255) << 8) | (int) (resultB * 255); 26 | 27 | } 28 | } 29 | return 0; 30 | } 31 | 32 | /** 33 | * Returns the rgba8888 color value. 34 | * @param rgb888 The rgb888 color value. 35 | * @param alpha The alpha (0 - 255) 36 | * @return the rgba8888 color value. 37 | */ 38 | public static int toRGBA888(int rgb888, int alpha) { 39 | return ((rgb888) << 8) + alpha; 40 | } 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /project/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | mavenCentral() 4 | maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } 5 | } 6 | dependencies { 7 | } 8 | } 9 | 10 | allprojects { 11 | apply plugin: "eclipse" 12 | apply plugin: "idea" 13 | 14 | ext { 15 | appName = "opusproto" 16 | gdxVersion = '1.7.1' 17 | roboVMVersion = '1.9.0' 18 | box2DLightsVersion = '1.4' 19 | ashleyVersion = '1.7.0' 20 | aiVersion = '1.6.0' 21 | } 22 | 23 | repositories { 24 | mavenCentral() 25 | maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } 26 | maven { url "https://oss.sonatype.org/content/repositories/releases/" } 27 | } 28 | } 29 | 30 | project(":editor") { 31 | apply plugin: "java" 32 | dependencies { 33 | compile project(":opuslib") 34 | compile project(":opusloaderjson") 35 | compile 'com.squareup:otto:1.3.8' 36 | compile 'com.google.code.gson:gson:2.3' 37 | compile files('libs/Ani-1.0.0.jar') 38 | compile 'org.apache.commons:commons-lang3:3.0' 39 | 40 | compile "com.badlogicgames.gdx:gdx:$gdxVersion" 41 | compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" 42 | compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 43 | } 44 | } 45 | 46 | project(":opuslib") { 47 | apply plugin: "java" 48 | } 49 | 50 | project(":opusloaderjson") { 51 | apply plugin: "java" 52 | dependencies { 53 | compile project(":opuslib") 54 | compile 'com.google.code.gson:gson:2.3' 55 | } 56 | } 57 | 58 | project(":example") { 59 | apply plugin: "java" 60 | } 61 | 62 | tasks.eclipse.doLast { 63 | delete ".project" 64 | } -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Ivan Sagalaev 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of highlight.js nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/CursorTextField.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler; 2 | 3 | import com.badlogic.gdx.Input; 4 | import com.badlogic.gdx.scenes.scene2d.InputEvent; 5 | import com.badlogic.gdx.scenes.scene2d.InputListener; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 7 | import com.badlogic.gdx.scenes.scene2d.ui.TextField; 8 | 9 | public class CursorTextField extends TextField { 10 | 11 | public CursorTextField(String text, Skin skin, final Notifyable n, final float offset) { 12 | super(text, skin); 13 | 14 | addListener(new InputListener() { 15 | @Override 16 | public boolean keyDown(InputEvent event, int keycode) { 17 | Float f = parseFloat(getText()); 18 | if (f != null) { 19 | f = (float) Math.round(f * 100f) / 100f; 20 | if (Input.Keys.UP == keycode) { 21 | f += offset; 22 | setProgrammaticChangeEvents(true); 23 | setText(f + ""); 24 | setProgrammaticChangeEvents(false); 25 | if (n != null) { 26 | n.notifyChanges(); 27 | } 28 | } 29 | if (Input.Keys.DOWN == keycode) { 30 | f -= offset; 31 | setProgrammaticChangeEvents(true); 32 | setText(f + ""); 33 | setProgrammaticChangeEvents(false); 34 | if (n != null) { 35 | n.notifyChanges(); 36 | 37 | } 38 | } 39 | } 40 | return super.keyDown(event, keycode); 41 | } 42 | }); 43 | } 44 | 45 | private Float parseFloat(String string) { 46 | try { 47 | float v = Float.parseFloat(string); 48 | return v; 49 | } catch(NumberFormatException e) { 50 | return null; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Opus prototype 2 | This is a tool to generate infinite landscapes by combining noise artifacts. 3 | You can use the editor to create a world and use the library to import it to your own application. 4 | Opus prototype offers you a way to easily describe landscapes (like seen in Minecraft) 5 | with values that are based on pseudo random noise algorithms. 6 | 7 | A mac and windows build of the editor can be loaded here: http://nuke-the-moon.itch.io/opus 8 | 9 | A short preview / tutorial of the functionality: https://youtu.be/3owuS5VRnAM 10 | 11 | This library is used for the game: http://nuke-the-moon.itch.io/alien-ark 12 | And for the game: http://nuke-the-moon.com/pioneerskies/index.html 13 | Created by www.nuke-the-moon.com 14 | 15 | For more information about Opus Prototype read the documentation: editor/data/docu/index.html 16 | 17 | This repo was released in a hurry. ~~The library is work in progress.~~ 18 | 19 | 20 | Licenced under the Apache License Version 2.0 21 | 22 | ## How to load a saved world ### 23 | To load a chunk of a saved world you have to import the base library *opuslib-0.0.1a.jar* and *opusloaderjson-0.0.1a.jar* to read the json format. 24 | ```java 25 | // create a loder for json files 26 | OpusLoaderJson opusJsonLoader = new OpusLoaderJson(); 27 | byte[] bytes = opusjsonLoader.readFile("worlds/NewWorld.json"); 28 | // load opus based on a saved world 29 | Opus opus = opusjsonLoader.load(new Samplers(), new Algorithms(), bytes); 30 | // create a chunk at x:0 y:0 with the standard resolution 1 31 | Chunk chunk = opus.createChunk(0, 0, 1); 32 | ``` 33 | The chunk now contains a map of height values. The instance of opus contains layer and interpreter information. 34 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/windows/AboutWindow.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.windows; 2 | 3 | import com.badlogic.gdx.graphics.Texture; 4 | import com.badlogic.gdx.scenes.scene2d.InputEvent; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Button; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Image; 7 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 8 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 9 | import com.badlogic.gdx.scenes.scene2d.ui.TextButton; 10 | import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; 11 | import com.nukethemoon.tools.opusproto.editor.Config; 12 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 13 | 14 | public class AboutWindow extends ClosableWindow { 15 | 16 | public AboutWindow(Skin skin) { 17 | super("ABOUT", skin); 18 | 19 | 20 | 21 | add(new Label(Config.NAME, skin)).padTop(20); 22 | row(); 23 | 24 | String versionText = "ver. " + Config.VERSION; 25 | Label versionLabel = new Label(versionText, skin); 26 | add(versionLabel); 27 | row(); 28 | 29 | if (Config.DEBUG) { 30 | add(new Label("debug mode", skin)); 31 | row(); 32 | } 33 | 34 | Label createdByLabel = new Label("created by", skin); 35 | add(createdByLabel).padTop(25); 36 | row(); 37 | 38 | add(new Image(new Texture("data/img/ntm_logo.png"))); 39 | row(); 40 | 41 | Button ntmLabel = new TextButton("nuke-the-moon.com", skin); 42 | ntmLabel.addListener(new ClickListener() { 43 | @Override 44 | public void clicked(InputEvent event, float x, float y) { 45 | super.clicked(event, x, y); 46 | Editor.openNTMPage(); 47 | } 48 | }); 49 | add(ntmLabel).padTop(5); 50 | row(); 51 | 52 | pack(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/flat/FlatSampler.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler.flat; 2 | 3 | import com.nukethemoon.tools.opusproto.sampler.Samplers; 4 | import com.nukethemoon.tools.opusproto.exceptions.SamplerInvalidConfigException; 5 | import com.nukethemoon.tools.opusproto.noise.Algorithms; 6 | import com.nukethemoon.tools.opusproto.region.ChunkRequestBuffer; 7 | import com.nukethemoon.tools.opusproto.sampler.AbstractSampler; 8 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 9 | 10 | public class FlatSampler extends AbstractSampler { 11 | 12 | private FlatSamplerConfig flatSamplerConfig; 13 | 14 | public FlatSampler(AbstractSamplerConfiguration config, double seed, Algorithms pool, Samplers samplers) throws SamplerInvalidConfigException { 15 | super(config, seed, pool, samplers); 16 | flatSamplerConfig = (FlatSamplerConfig) config; 17 | init(); 18 | } 19 | 20 | @Override 21 | public float[][] bufferedCreateValues(float x, float y, int size, float scaleFactor, 22 | float resolution, 23 | double seedModifier, ChunkRequestBuffer buffer) { 24 | 25 | int resSize = (int) Math.ceil(size / resolution); 26 | float[][] data = new float[resSize][resSize]; 27 | for (int xTmp = 0; xTmp < data.length; xTmp++) { 28 | for (int yTmp = 0; yTmp < data[xTmp].length; yTmp++) { 29 | data[xTmp][yTmp] = flatSamplerConfig.value; 30 | } 31 | } 32 | return data; 33 | } 34 | 35 | @Override 36 | public void loadConfig() { 37 | 38 | } 39 | 40 | @Override 41 | protected void compute(float[][] data) { 42 | 43 | } 44 | 45 | 46 | @Override 47 | public float getMaxSample() { 48 | return flatSamplerConfig.value; 49 | } 50 | 51 | @Override 52 | public float getMinSample() { 53 | return flatSamplerConfig.value; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/sampler/noise/NoiseSampler.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.sampler.noise; 2 | 3 | import com.nukethemoon.tools.opusproto.exceptions.SamplerInvalidConfigException; 4 | import com.nukethemoon.tools.opusproto.noise.AbstractNoiseAlgorithm; 5 | import com.nukethemoon.tools.opusproto.noise.Algorithms; 6 | import com.nukethemoon.tools.opusproto.region.ChunkRequestBuffer; 7 | import com.nukethemoon.tools.opusproto.sampler.AbstractSampler; 8 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 9 | import com.nukethemoon.tools.opusproto.sampler.Samplers; 10 | 11 | public class NoiseSampler extends AbstractSampler { 12 | 13 | private AbstractNoiseAlgorithm noiseAlgorithm; 14 | private NoiseConfig noiseConfig; 15 | 16 | public NoiseSampler(AbstractSamplerConfiguration config, double seed, Algorithms algorithms, Samplers samplers) throws SamplerInvalidConfigException { 17 | super(config, seed, algorithms, samplers); 18 | noiseConfig = (NoiseConfig) config; 19 | init(); 20 | } 21 | 22 | @Override 23 | public void loadConfig() { 24 | this.noiseAlgorithm = noisePool.getAlgorithm(noiseConfig.noiseAlgorithmName); 25 | } 26 | 27 | @Override 28 | public float[][] bufferedCreateValues(float x, float y, 29 | int size, float scaleFactor, 30 | float res, 31 | double seedModifier, ChunkRequestBuffer buffer) { 32 | 33 | 34 | return noiseAlgorithm.createData(x, y, size, 35 | getModifiedSeed(getContainingSeed(), seedModifier), 36 | config.scale * scaleFactor, res); 37 | } 38 | 39 | @Override 40 | protected void compute(float[][] data) { 41 | 42 | } 43 | 44 | @Override 45 | public float getMaxSample() { 46 | return 1; 47 | } 48 | 49 | @Override 50 | public float getMinSample() { 51 | return 0; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/codepen-embed.css: -------------------------------------------------------------------------------- 1 | /* 2 | codepen.io Embed Theme 3 | Author: Justin Perry 4 | Original theme - https://github.com/chriskempson/tomorrow-theme 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #222; 12 | color: #fff; 13 | font-family: Menlo, Monaco, 'Andale Mono', 'Lucida Console', 'Courier New', monospace; 14 | -webkit-text-size-adjust: none; 15 | } 16 | 17 | .hljs-comment, 18 | .hljs-title { 19 | color: #777; 20 | } 21 | 22 | .hljs-variable, 23 | .hljs-attribute, 24 | .hljs-tag, 25 | .hljs-regexp, 26 | .hljs-name, 27 | .ruby .constant, 28 | .xml .tag .title, 29 | .xml .pi, 30 | .xml .doctype, 31 | .html .doctype { 32 | color: #ab875d; 33 | } 34 | 35 | .css .value { 36 | color: #cd6a51; 37 | } 38 | 39 | .css .value .function, 40 | .css .value .string { 41 | color: #a67f59; 42 | } 43 | 44 | .css .value .number { 45 | color: #9b869c; 46 | } 47 | 48 | .css .id, 49 | .css .class, 50 | .css-pseudo, 51 | .css .selector, 52 | .css .tag { 53 | color: #dfc48c; 54 | } 55 | 56 | .hljs-number, 57 | .hljs-preprocessor, 58 | .hljs-built_in, 59 | .hljs-literal, 60 | .hljs-params, 61 | .hljs-constant { 62 | color: #ab875d; 63 | } 64 | 65 | .ruby .class .title, 66 | .css .rules .attribute { 67 | color: #9b869b; 68 | } 69 | 70 | .hljs-string, 71 | .hljs-value, 72 | .hljs-inheritance, 73 | .hljs-header, 74 | .ruby .symbol, 75 | .xml .cdata { 76 | color: #8f9c6c; 77 | } 78 | 79 | .css .hexcolor { 80 | color: #cd6a51; 81 | } 82 | 83 | .function, 84 | .python .decorator, 85 | .python .title, 86 | .ruby .function .title, 87 | .ruby .title .keyword, 88 | .perl .sub, 89 | .javascript .title, 90 | .coffeescript .title { 91 | color: #fff; 92 | } 93 | 94 | .hljs-keyword, 95 | .javascript .function { 96 | color: #8f9c6c; 97 | } 98 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/menu/tables/AbstractMenuTable.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.menu.tables; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 5 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 6 | 7 | public class AbstractMenuTable extends Table { 8 | 9 | protected CloseListener listener; 10 | protected Table contentTable; 11 | 12 | public AbstractMenuTable(Skin skin, String title) { 13 | super(skin); 14 | 15 | contentTable = new Table(skin); 16 | contentTable.setVisible(false); 17 | contentTable.padTop(4); 18 | contentTable.defaults().pad(2); 19 | contentTable.setBackground(Styles.INNER_BACKGROUND); 20 | 21 | Table titleTable = new Table(skin); 22 | MenuButton textButton = new MenuButton(title, skin); 23 | textButton.setClickListener(new MenuButton.MenuButtonClickListener() { 24 | @Override 25 | public void onClick() { 26 | contentTable.setVisible(!contentTable.isVisible()); 27 | pack(); 28 | } 29 | }); 30 | 31 | textButton.setMouseListener(new MenuButton.MenuButtonMouseListener() { 32 | @Override 33 | public void onHover() { 34 | //contentTable.setVisible(true); 35 | } 36 | 37 | @Override 38 | public void onLeave() { 39 | 40 | } 41 | }); 42 | 43 | titleTable.setBackground(Styles.STANDARD_BACKGROUND); 44 | titleTable.add(textButton).expand().left().fill(); 45 | add(titleTable).expand().left().fill(); 46 | row(); 47 | 48 | add(contentTable); 49 | } 50 | 51 | protected void handleClose() { 52 | contentTable.setVisible(false); 53 | if (listener != null) { 54 | listener.onClose(); 55 | } 56 | } 57 | 58 | public void setCloseListener(CloseListener listener) { 59 | this.listener = listener; 60 | } 61 | 62 | public interface CloseListener { 63 | void onClose(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/InputTable.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 7 | import com.badlogic.gdx.scenes.scene2d.ui.TextField; 8 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 9 | 10 | import java.util.HashMap; 11 | import java.util.Map; 12 | 13 | public class InputTable extends Table { 14 | 15 | public Map nameToTextField = new HashMap(); 16 | private InputTable.EntryValueListener listener; 17 | 18 | public InputTable(Skin skin) { 19 | super(skin); 20 | defaults().pad(2); 21 | } 22 | 23 | public void addEntry(String name) { 24 | addEntry(name, -1); 25 | } 26 | 27 | public void addEntry(final String name, int width) { 28 | final TextField textField = new TextField("", getSkin()); 29 | nameToTextField.put(name, textField); 30 | add(new Label(name, getSkin())).fill().left(); 31 | if (width != -1) { 32 | add(textField).fill().right().width(width); 33 | } else { 34 | add(textField).fill().right(); 35 | } 36 | 37 | textField.addListener(new ChangeListener() { 38 | @Override 39 | public void changed(ChangeEvent event, Actor actor) { 40 | if (listener != null) { 41 | listener.onChange(name, textField.getText()); 42 | } 43 | } 44 | }); 45 | 46 | row(); 47 | pack(); 48 | } 49 | 50 | public TextField getTextField(String name) { 51 | return nameToTextField.get(name); 52 | } 53 | 54 | public void setEntryValueListener(EntryValueListener listener) { 55 | this.listener = listener; 56 | } 57 | 58 | public interface EntryValueListener { 59 | void onChange(String entryName, String entryValue); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/hopscotch.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Hopscotch 3 | * by Jan T. Sott 4 | * https://github.com/idleberg/Hopscotch 5 | * 6 | * This work is licensed under the Creative Commons CC0 1.0 Universal License 7 | */ 8 | 9 | /* Comment */ 10 | .hljs-comment, 11 | .hljs-title { 12 | color: #989498; 13 | } 14 | 15 | /* Red */ 16 | .hljs-variable, 17 | .hljs-attribute, 18 | .hljs-tag, 19 | .hljs-regexp, 20 | .ruby .hljs-constant, 21 | .xml .hljs-tag .hljs-title, 22 | .xml .hljs-pi, 23 | .xml .hljs-doctype, 24 | .html .hljs-doctype, 25 | .css .hljs-id, 26 | .css .hljs-class, 27 | .css .hljs-pseudo { 28 | color: #dd464c; 29 | } 30 | 31 | /* Orange */ 32 | .hljs-number, 33 | .hljs-preprocessor, 34 | .hljs-built_in, 35 | .hljs-literal, 36 | .hljs-params, 37 | .hljs-constant { 38 | color: #fd8b19; 39 | } 40 | 41 | /* Yellow */ 42 | .ruby .hljs-class .hljs-title, 43 | .css .hljs-rules .hljs-attribute { 44 | color: #fdcc59; 45 | } 46 | 47 | /* Green */ 48 | .hljs-string, 49 | .hljs-value, 50 | .hljs-inheritance, 51 | .hljs-header, 52 | .ruby .hljs-symbol, 53 | .xml .hljs-cdata { 54 | color: #8fc13e; 55 | } 56 | 57 | /* Aqua */ 58 | .css .hljs-hexcolor { 59 | color: #149b93; 60 | } 61 | 62 | /* Blue */ 63 | .hljs-function, 64 | .python .hljs-decorator, 65 | .python .hljs-title, 66 | .ruby .hljs-function .hljs-title, 67 | .ruby .hljs-title .hljs-keyword, 68 | .perl .hljs-sub, 69 | .javascript .hljs-title, 70 | .coffeescript .hljs-title { 71 | color: #1290bf; 72 | } 73 | 74 | /* Purple */ 75 | .hljs-keyword, 76 | .javascript .hljs-function { 77 | color: #c85e7c; 78 | } 79 | 80 | .hljs { 81 | display: block; 82 | background: #322931; 83 | color: #b9b5b8; 84 | padding: 0.5em; 85 | } 86 | 87 | .coffeescript .javascript, 88 | .javascript .xml, 89 | .tex .hljs-formula, 90 | .xml .javascript, 91 | .xml .vbscript, 92 | .xml .css, 93 | .xml .hljs-cdata { 94 | opacity: 0.5; 95 | } 96 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/tomorrow.css: -------------------------------------------------------------------------------- 1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 2 | 3 | /* Tomorrow Comment */ 4 | .hljs-comment { 5 | color: #8e908c; 6 | } 7 | 8 | /* Tomorrow Red */ 9 | .hljs-variable, 10 | .hljs-attribute, 11 | .hljs-tag, 12 | .hljs-regexp, 13 | .ruby .hljs-constant, 14 | .xml .hljs-tag .hljs-title, 15 | .xml .hljs-pi, 16 | .xml .hljs-doctype, 17 | .html .hljs-doctype, 18 | .css .hljs-id, 19 | .css .hljs-class, 20 | .css .hljs-pseudo { 21 | color: #c82829; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-preprocessor, 27 | .hljs-pragma, 28 | .hljs-built_in, 29 | .hljs-literal, 30 | .hljs-params, 31 | .hljs-constant { 32 | color: #f5871f; 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .ruby .hljs-class .hljs-title, 37 | .css .hljs-rule .hljs-attribute { 38 | color: #eab700; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-value, 44 | .hljs-inheritance, 45 | .hljs-header, 46 | .hljs-name, 47 | .ruby .hljs-symbol, 48 | .xml .hljs-cdata { 49 | color: #718c00; 50 | } 51 | 52 | /* Tomorrow Aqua */ 53 | .hljs-title, 54 | .css .hljs-hexcolor { 55 | color: #3e999f; 56 | } 57 | 58 | /* Tomorrow Blue */ 59 | .hljs-function, 60 | .python .hljs-decorator, 61 | .python .hljs-title, 62 | .ruby .hljs-function .hljs-title, 63 | .ruby .hljs-title .hljs-keyword, 64 | .perl .hljs-sub, 65 | .javascript .hljs-title, 66 | .coffeescript .hljs-title { 67 | color: #4271ae; 68 | } 69 | 70 | /* Tomorrow Purple */ 71 | .hljs-keyword, 72 | .javascript .hljs-function { 73 | color: #8959a8; 74 | } 75 | 76 | .hljs { 77 | display: block; 78 | overflow-x: auto; 79 | background: white; 80 | color: #4d4d4c; 81 | padding: 0.5em; 82 | -webkit-text-size-adjust: none; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/NewSamplerDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.Input; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 5 | import com.badlogic.gdx.scenes.scene2d.ui.SelectBox; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 7 | import com.badlogic.gdx.scenes.scene2d.ui.TextField; 8 | import com.nukethemoon.tools.opusproto.sampler.Samplers; 9 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 10 | import com.nukethemoon.tools.opusproto.editor.message.sampler.CommandCreateSampler; 11 | 12 | 13 | public class NewSamplerDialog extends BaseDialog { 14 | 15 | private final TextField nameField; 16 | private final SelectBox selectBox; 17 | 18 | public NewSamplerDialog(Skin skin) { 19 | super("Create new sampler", skin); 20 | 21 | 22 | Label nameLabel = new Label("Name", skin); 23 | getContentTable().add(nameLabel); 24 | nameField = new TextField("default", skin); 25 | getContentTable().pad(2); 26 | getContentTable().add(nameField); 27 | getContentTable().row(); 28 | 29 | selectBox = new SelectBox(skin); 30 | String[] samplerNames = new String[Samplers.SAMPLER_TO_CONFIG.size()]; 31 | int i = 0; 32 | for (Class c : Samplers.SAMPLER_TO_CONFIG.keySet()) { 33 | samplerNames[i] = c.getSimpleName(); 34 | i++; 35 | } 36 | selectBox.setItems(samplerNames); 37 | Label typeLabel = new Label("Type", skin); 38 | getContentTable().add(typeLabel); 39 | getContentTable().add(selectBox); 40 | 41 | key(Input.Keys.ENTER, true); 42 | key(Input.Keys.ESCAPE, false); 43 | button("create", true); 44 | button("cancel", false); 45 | } 46 | 47 | @Override 48 | protected void result(Object object) { 49 | Boolean success = (Boolean)object; 50 | if (success) { 51 | String name = nameField.getText(); 52 | String type = selectBox.getSelected(); 53 | Editor.post(new CommandCreateSampler(name, type)); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-annotation, 17 | .diff .hljs-header, 18 | .hljs-chunk, 19 | .apache .hljs-cbracket { 20 | color: #008000; 21 | } 22 | 23 | .hljs-keyword, 24 | .hljs-id, 25 | .hljs-built_in, 26 | .smalltalk .hljs-class, 27 | .hljs-winutils, 28 | .bash .hljs-variable, 29 | .tex .hljs-command, 30 | .hljs-request, 31 | .hljs-status, 32 | .nginx .hljs-title, 33 | .xml .hljs-tag, 34 | .xml .hljs-tag .hljs-value { 35 | color: #00f; 36 | } 37 | 38 | .hljs-string, 39 | .hljs-title, 40 | .hljs-parent, 41 | .hljs-tag .hljs-value, 42 | .hljs-rule .hljs-value, 43 | .ruby .hljs-symbol, 44 | .ruby .hljs-symbol .hljs-string, 45 | .hljs-template_tag, 46 | .django .hljs-variable, 47 | .hljs-addition, 48 | .hljs-flow, 49 | .hljs-stream, 50 | .apache .hljs-tag, 51 | .hljs-date, 52 | .tex .hljs-formula, 53 | .coffeescript .hljs-attribute, 54 | .hljs-name { 55 | color: #a31515; 56 | } 57 | 58 | .ruby .hljs-string, 59 | .hljs-decorator, 60 | .hljs-filter .hljs-argument, 61 | .hljs-localvars, 62 | .hljs-array, 63 | .hljs-attr_selector, 64 | .hljs-pseudo, 65 | .hljs-pi, 66 | .hljs-doctype, 67 | .hljs-deletion, 68 | .hljs-envvar, 69 | .hljs-shebang, 70 | .hljs-preprocessor, 71 | .hljs-pragma, 72 | .userType, 73 | .apache .hljs-sqbracket, 74 | .nginx .hljs-built_in, 75 | .tex .hljs-special, 76 | .hljs-prompt { 77 | color: #2b91af; 78 | } 79 | 80 | .hljs-doctag, 81 | .hljs-xmlDocTag { 82 | color: #808080; 83 | } 84 | 85 | .hljs-type, 86 | .hljs-typename { font-weight: bold; } 87 | 88 | .vhdl .hljs-string { color: #666666; } 89 | .vhdl .hljs-literal { color: #a31515; } 90 | .vhdl .hljs-attribute { color: #00b0e8; } 91 | 92 | .xml .hljs-attribute { color: #f00; } 93 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/paraiso.dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (dark) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-title { 10 | color: #8d8687; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-attribute, 16 | .hljs-tag, 17 | .hljs-regexp, 18 | .hljs-name, 19 | .ruby .hljs-constant, 20 | .xml .hljs-tag .hljs-title, 21 | .xml .hljs-pi, 22 | .xml .hljs-doctype, 23 | .html .hljs-doctype, 24 | .css .hljs-id, 25 | .css .hljs-class, 26 | .css .hljs-pseudo { 27 | color: #ef6155; 28 | } 29 | 30 | /* Paraíso Orange */ 31 | .hljs-number, 32 | .hljs-preprocessor, 33 | .hljs-built_in, 34 | .hljs-literal, 35 | .hljs-params, 36 | .hljs-constant { 37 | color: #f99b15; 38 | } 39 | 40 | /* Paraíso Yellow */ 41 | .ruby .hljs-class .hljs-title, 42 | .css .hljs-rule .hljs-attribute { 43 | color: #fec418; 44 | } 45 | 46 | /* Paraíso Green */ 47 | .hljs-string, 48 | .hljs-value, 49 | .hljs-inheritance, 50 | .hljs-header, 51 | .ruby .hljs-symbol, 52 | .xml .hljs-cdata { 53 | color: #48b685; 54 | } 55 | 56 | /* Paraíso Aqua */ 57 | .css .hljs-hexcolor { 58 | color: #5bc4bf; 59 | } 60 | 61 | /* Paraíso Blue */ 62 | .hljs-function, 63 | .python .hljs-decorator, 64 | .python .hljs-title, 65 | .ruby .hljs-function .hljs-title, 66 | .ruby .hljs-title .hljs-keyword, 67 | .perl .hljs-sub, 68 | .javascript .hljs-title, 69 | .coffeescript .hljs-title { 70 | color: #06b6ef; 71 | } 72 | 73 | /* Paraíso Purple */ 74 | .hljs-keyword, 75 | .javascript .hljs-function { 76 | color: #815ba4; 77 | } 78 | 79 | .hljs { 80 | display: block; 81 | overflow-x: auto; 82 | background: #2f1e2e; 83 | color: #a39e9b; 84 | padding: 0.5em; 85 | -webkit-text-size-adjust: none; 86 | } 87 | 88 | .coffeescript .javascript, 89 | .javascript .xml, 90 | .tex .hljs-formula, 91 | .xml .javascript, 92 | .xml .vbscript, 93 | .xml .css, 94 | .xml .hljs-cdata { 95 | opacity: 0.5; 96 | } 97 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/paraiso.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (light) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-title { 10 | color: #776e71; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-attribute, 16 | .hljs-tag, 17 | .hljs-regexp, 18 | .hljs-name, 19 | .ruby .hljs-constant, 20 | .xml .hljs-tag .hljs-title, 21 | .xml .hljs-pi, 22 | .xml .hljs-doctype, 23 | .html .hljs-doctype, 24 | .css .hljs-id, 25 | .css .hljs-class, 26 | .css .hljs-pseudo { 27 | color: #ef6155; 28 | } 29 | 30 | /* Paraíso Orange */ 31 | .hljs-number, 32 | .hljs-preprocessor, 33 | .hljs-built_in, 34 | .hljs-literal, 35 | .hljs-params, 36 | .hljs-constant { 37 | color: #f99b15; 38 | } 39 | 40 | /* Paraíso Yellow */ 41 | .ruby .hljs-class .hljs-title, 42 | .css .hljs-rule .hljs-attribute { 43 | color: #fec418; 44 | } 45 | 46 | /* Paraíso Green */ 47 | .hljs-string, 48 | .hljs-value, 49 | .hljs-inheritance, 50 | .hljs-header, 51 | .ruby .hljs-symbol, 52 | .xml .hljs-cdata { 53 | color: #48b685; 54 | } 55 | 56 | /* Paraíso Aqua */ 57 | .css .hljs-hexcolor { 58 | color: #5bc4bf; 59 | } 60 | 61 | /* Paraíso Blue */ 62 | .hljs-function, 63 | .python .hljs-decorator, 64 | .python .hljs-title, 65 | .ruby .hljs-function .hljs-title, 66 | .ruby .hljs-title .hljs-keyword, 67 | .perl .hljs-sub, 68 | .javascript .hljs-title, 69 | .coffeescript .hljs-title { 70 | color: #06b6ef; 71 | } 72 | 73 | /* Paraíso Purple */ 74 | .hljs-keyword, 75 | .javascript .hljs-function { 76 | color: #815ba4; 77 | } 78 | 79 | .hljs { 80 | display: block; 81 | overflow-x: auto; 82 | background: #e7e9db; 83 | color: #4f424c; 84 | padding: 0.5em; 85 | -webkit-text-size-adjust: none; 86 | } 87 | 88 | .coffeescript .javascript, 89 | .javascript .xml, 90 | .tex .hljs-formula, 91 | .xml .javascript, 92 | .xml .vbscript, 93 | .xml .css, 94 | .xml .hljs-cdata { 95 | opacity: 0.5; 96 | } 97 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/menu/tables/MenuButton.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.menu.tables; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.InputEvent; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 7 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 8 | import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; 9 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 10 | 11 | public class MenuButton extends Table { 12 | 13 | private MenuButtonClickListener clickListener; 14 | private MenuButtonMouseListener mouseListener; 15 | 16 | public MenuButton(String text, Skin skin) { 17 | 18 | Label textLabel = new Label(text, skin); 19 | add(textLabel).expand().expand().fill().left(); 20 | 21 | addListener(new ClickListener() { 22 | @Override 23 | public void clicked(InputEvent event, float x, float y) { 24 | if (clickListener != null) { 25 | clickListener.onClick(); 26 | } 27 | } 28 | 29 | @Override 30 | public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) { 31 | setBackground(Styles.SELECTED_BACKGROUND); 32 | if (mouseListener != null) { 33 | mouseListener.onHover(); 34 | } 35 | } 36 | 37 | @Override 38 | public void exit(InputEvent event, float x, float y, int pointer, Actor toActor) { 39 | setBackground(Styles.TRANSPARENT_BACKGROUND); 40 | if (mouseListener != null) { 41 | mouseListener.onLeave(); 42 | } 43 | } 44 | }); 45 | pack(); 46 | } 47 | 48 | public void setClickListener(MenuButtonClickListener listener) { 49 | this.clickListener = listener; 50 | } 51 | 52 | public void setMouseListener(MenuButtonMouseListener listener) { 53 | this.mouseListener = listener; 54 | } 55 | 56 | 57 | public interface MenuButtonClickListener { 58 | void onClick(); 59 | } 60 | 61 | public interface MenuButtonMouseListener { 62 | void onHover(); 63 | void onLeave(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/kimbie.dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (dark) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-title { 11 | color: #d6baad; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-attribute, 17 | .hljs-tag, 18 | .hljs-regexp, 19 | .hljs-name, 20 | .ruby .hljs-constant, 21 | .xml .hljs-tag .hljs-title, 22 | .xml .hljs-pi, 23 | .xml .hljs-doctype, 24 | .html .hljs-doctype, 25 | .css .hljs-id, 26 | .css .hljs-class, 27 | .css .hljs-pseudo { 28 | color: #dc3958; 29 | } 30 | 31 | /* Kimbie Orange */ 32 | .hljs-number, 33 | .hljs-preprocessor, 34 | .hljs-built_in, 35 | .hljs-literal, 36 | .hljs-params, 37 | .hljs-constant { 38 | color: #f79a32; 39 | } 40 | 41 | /* Kimbie Yellow */ 42 | .ruby .hljs-class .hljs-title, 43 | .css .hljs-rule .hljs-attribute { 44 | color: #f06431; 45 | } 46 | 47 | /* Kimbie Green */ 48 | .hljs-string, 49 | .hljs-value, 50 | .hljs-inheritance, 51 | .hljs-header, 52 | .ruby .hljs-symbol, 53 | .xml .hljs-cdata { 54 | color: #889b4a; 55 | } 56 | 57 | /* Kimbie Aqua */ 58 | .css .hljs-hexcolor { 59 | color: #088649; 60 | } 61 | 62 | /* Kimbie Blue */ 63 | .hljs-function, 64 | .python .hljs-decorator, 65 | .python .hljs-title, 66 | .ruby .hljs-function .hljs-title, 67 | .ruby .hljs-title .hljs-keyword, 68 | .perl .hljs-sub, 69 | .javascript .hljs-title, 70 | .coffeescript .hljs-title { 71 | color: #8ab1b0; 72 | } 73 | 74 | /* Kimbie Purple */ 75 | .hljs-keyword, 76 | .javascript .hljs-function { 77 | color: #98676a; 78 | } 79 | 80 | .hljs { 81 | display: block; 82 | overflow-x: auto; 83 | background: #221a0f; 84 | color: #d3af86; 85 | padding: 0.5em; 86 | -webkit-text-size-adjust: none; 87 | } 88 | 89 | .coffeescript .javascript, 90 | .javascript .xml, 91 | .tex .hljs-formula, 92 | .xml .javascript, 93 | .xml .vbscript, 94 | .xml .css, 95 | .xml .hljs-cdata { 96 | opacity: 0.5; 97 | } 98 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/ir_black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #000; 10 | color: #f8f8f8; 11 | -webkit-text-size-adjust: none; 12 | } 13 | 14 | .hljs-shebang, 15 | .hljs-comment { 16 | color: #7c7c7c; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-tag, 21 | .tex .hljs-command, 22 | .hljs-request, 23 | .hljs-status, 24 | .clojure .hljs-attribute { 25 | color: #96cbfe; 26 | } 27 | 28 | .hljs-sub .hljs-keyword, 29 | .method, 30 | .hljs-list .hljs-title, 31 | .nginx .hljs-title { 32 | color: #ffffb6; 33 | } 34 | 35 | .hljs-string, 36 | .hljs-tag .hljs-value, 37 | .hljs-cdata, 38 | .hljs-filter .hljs-argument, 39 | .hljs-attr_selector, 40 | .apache .hljs-cbracket, 41 | .hljs-date, 42 | .coffeescript .hljs-attribute { 43 | color: #a8ff60; 44 | } 45 | 46 | .hljs-subst { 47 | color: #daefa3; 48 | } 49 | 50 | .hljs-regexp { 51 | color: #e9c062; 52 | } 53 | 54 | .hljs-title, 55 | .hljs-sub .hljs-identifier, 56 | .hljs-pi, 57 | .hljs-decorator, 58 | .tex .hljs-special, 59 | .hljs-type, 60 | .hljs-constant, 61 | .smalltalk .hljs-class, 62 | .hljs-doctag, 63 | .nginx .hljs-built_in { 64 | color: #ffffb6; 65 | } 66 | 67 | .hljs-symbol, 68 | .ruby .hljs-symbol .hljs-string, 69 | .hljs-number, 70 | .hljs-variable, 71 | .vbscript, 72 | .hljs-literal, 73 | .hljs-name { 74 | color: #c6c5fe; 75 | } 76 | 77 | .css .hljs-tag { 78 | color: #96cbfe; 79 | } 80 | 81 | .css .hljs-rule .hljs-property, 82 | .css .hljs-id { 83 | color: #ffffb6; 84 | } 85 | 86 | .css .hljs-class { 87 | color: #fff; 88 | } 89 | 90 | .hljs-hexcolor { 91 | color: #c6c5fe; 92 | } 93 | 94 | .hljs-number { 95 | color:#ff73fd; 96 | } 97 | 98 | .coffeescript .javascript, 99 | .javascript .xml, 100 | .tex .hljs-formula, 101 | .xml .javascript, 102 | .xml .vbscript, 103 | .xml .css, 104 | .xml .hljs-cdata { 105 | opacity: 0.7; 106 | } 107 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/kimbie.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (light) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-title { 11 | color: #a57a4c; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-attribute, 17 | .hljs-tag, 18 | .hljs-regexp, 19 | .hljs-name, 20 | .ruby .hljs-constant, 21 | .xml .hljs-tag .hljs-title, 22 | .xml .hljs-pi, 23 | .xml .hljs-doctype, 24 | .html .hljs-doctype, 25 | .css .hljs-id, 26 | .css .hljs-class, 27 | .css .hljs-pseudo { 28 | color: #dc3958; 29 | } 30 | 31 | /* Kimbie Orange */ 32 | .hljs-number, 33 | .hljs-preprocessor, 34 | .hljs-built_in, 35 | .hljs-literal, 36 | .hljs-params, 37 | .hljs-constant { 38 | color: #f79a32; 39 | } 40 | 41 | /* Kimbie Yellow */ 42 | .ruby .hljs-class .hljs-title, 43 | .css .hljs-rule .hljs-attribute { 44 | color: #f06431; 45 | } 46 | 47 | /* Kimbie Green */ 48 | .hljs-string, 49 | .hljs-value, 50 | .hljs-inheritance, 51 | .hljs-header, 52 | .ruby .hljs-symbol, 53 | .xml .hljs-cdata { 54 | color: #889b4a; 55 | } 56 | 57 | /* Kimbie Aqua */ 58 | .css .hljs-hexcolor { 59 | color: #088649; 60 | } 61 | 62 | /* Kimbie Blue */ 63 | .hljs-function, 64 | .python .hljs-decorator, 65 | .python .hljs-title, 66 | .ruby .hljs-function .hljs-title, 67 | .ruby .hljs-title .hljs-keyword, 68 | .perl .hljs-sub, 69 | .javascript .hljs-title, 70 | .coffeescript .hljs-title { 71 | color: #8ab1b0; 72 | } 73 | 74 | /* Kimbie Purple */ 75 | .hljs-keyword, 76 | .javascript .hljs-function { 77 | color: #98676a; 78 | } 79 | 80 | .hljs { 81 | display: block; 82 | overflow-x: auto; 83 | background: #fbebd4; 84 | color: #84613d; 85 | padding: 0.5em; 86 | -webkit-text-size-adjust: none; 87 | } 88 | 89 | .coffeescript .javascript, 90 | .javascript .xml, 91 | .tex .hljs-formula, 92 | .xml .javascript, 93 | .xml .vbscript, 94 | .xml .css, 95 | .xml .hljs-cdata { 96 | opacity: 0.5; 97 | } 98 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Bright Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment { 7 | color: #969896; 8 | } 9 | 10 | /* Tomorrow Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .ruby .hljs-constant, 16 | .xml .hljs-tag .hljs-title, 17 | .xml .hljs-pi, 18 | .xml .hljs-doctype, 19 | .html .hljs-doctype, 20 | .css .hljs-id, 21 | .css .hljs-class, 22 | .css .hljs-pseudo { 23 | color: #d54e53; 24 | } 25 | 26 | /* Tomorrow Orange */ 27 | .hljs-number, 28 | .hljs-preprocessor, 29 | .hljs-pragma, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #e78c45; 35 | } 36 | 37 | /* Tomorrow Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #e7c547; 41 | } 42 | 43 | /* Tomorrow Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .hljs-name, 49 | .ruby .hljs-symbol, 50 | .xml .hljs-cdata { 51 | color: #b9ca4a; 52 | } 53 | 54 | /* Tomorrow Aqua */ 55 | .hljs-title, 56 | .css .hljs-hexcolor { 57 | color: #70c0b1; 58 | } 59 | 60 | /* Tomorrow Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #7aa6da; 70 | } 71 | 72 | /* Tomorrow Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #c397d8; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | overflow-x: auto; 81 | background: black; 82 | color: #eaeaea; 83 | padding: 0.5em; 84 | -webkit-text-size-adjust: none; 85 | } 86 | 87 | .coffeescript .javascript, 88 | .javascript .xml, 89 | .tex .hljs-formula, 90 | .xml .javascript, 91 | .xml .vbscript, 92 | .xml .css, 93 | .xml .hljs-cdata { 94 | opacity: 0.5; 95 | } 96 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/tomorrow-night-eighties.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Eighties Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment { 7 | color: #999999; 8 | } 9 | 10 | /* Tomorrow Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .ruby .hljs-constant, 16 | .xml .hljs-tag .hljs-title, 17 | .xml .hljs-pi, 18 | .xml .hljs-doctype, 19 | .html .hljs-doctype, 20 | .css .hljs-id, 21 | .css .hljs-class, 22 | .css .hljs-pseudo { 23 | color: #f2777a; 24 | } 25 | 26 | /* Tomorrow Orange */ 27 | .hljs-number, 28 | .hljs-preprocessor, 29 | .hljs-pragma, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #f99157; 35 | } 36 | 37 | /* Tomorrow Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #ffcc66; 41 | } 42 | 43 | /* Tomorrow Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .hljs-name, 49 | .ruby .hljs-symbol, 50 | .xml .hljs-cdata { 51 | color: #99cc99; 52 | } 53 | 54 | /* Tomorrow Aqua */ 55 | .hljs-title, 56 | .css .hljs-hexcolor { 57 | color: #66cccc; 58 | } 59 | 60 | /* Tomorrow Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #6699cc; 70 | } 71 | 72 | /* Tomorrow Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #cc99cc; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | overflow-x: auto; 81 | background: #2d2d2d; 82 | color: #cccccc; 83 | padding: 0.5em; 84 | -webkit-text-size-adjust: none; 85 | } 86 | 87 | .coffeescript .javascript, 88 | .javascript .xml, 89 | .tex .hljs-formula, 90 | .xml .javascript, 91 | .xml .vbscript, 92 | .xml .css, 93 | .xml .hljs-cdata { 94 | opacity: 0.5; 95 | } 96 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/rainbow.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Style with support for rainbow parens 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #474949; 12 | color: #d1d9e1; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | 17 | .hljs-body, 18 | .hljs-collection { 19 | color: #d1d9e1; 20 | } 21 | 22 | .hljs-comment, 23 | .diff .hljs-header, 24 | .hljs-doctype, 25 | .lisp .hljs-string { 26 | color: #969896; 27 | font-style: italic; 28 | } 29 | 30 | .hljs-keyword, 31 | .clojure .hljs-attribute, 32 | .hljs-winutils, 33 | .javascript .hljs-title, 34 | .hljs-addition, 35 | .css .hljs-tag { 36 | color: #cc99cc; 37 | } 38 | 39 | .hljs-number { color: #f99157; } 40 | 41 | .hljs-command, 42 | .hljs-string, 43 | .hljs-tag .hljs-value, 44 | .hljs-doctag, 45 | .tex .hljs-formula, 46 | .hljs-regexp, 47 | .hljs-hexcolor { 48 | color: #8abeb7; 49 | } 50 | 51 | .hljs-title, 52 | .hljs-localvars, 53 | .hljs-function .hljs-title, 54 | .hljs-chunk, 55 | .hljs-decorator, 56 | .hljs-built_in, 57 | .hljs-identifier { 58 | color: #b5bd68; 59 | } 60 | 61 | .hljs-class .hljs-keyword { 62 | color: #f2777a; 63 | } 64 | 65 | .hljs-variable, 66 | .smalltalk .hljs-number, 67 | .hljs-constant, 68 | .hljs-class .hljs-title, 69 | .hljs-parent, 70 | .haskell .hljs-label, 71 | .hljs-id, 72 | .hljs-name { 73 | color: #ffcc66; 74 | } 75 | 76 | .hljs-tag .hljs-title, 77 | .hljs-rule .hljs-property, 78 | .django .hljs-tag .hljs-keyword { 79 | font-weight: bold; 80 | } 81 | 82 | .hljs-attribute { 83 | color: #81a2be; 84 | } 85 | 86 | .hljs-preprocessor, 87 | .hljs-pragma, 88 | .hljs-pi, 89 | .hljs-shebang, 90 | .hljs-symbol, 91 | .hljs-symbol .hljs-string, 92 | .diff .hljs-change, 93 | .hljs-special, 94 | .hljs-attr_selector, 95 | .hljs-important, 96 | .hljs-subst, 97 | .hljs-cdata { 98 | color: #f99157; 99 | } 100 | 101 | .hljs-deletion { 102 | color: #dc322f; 103 | } 104 | 105 | .tex .hljs-formula { 106 | background: #eee8d5; 107 | } 108 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/NewProjectDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.Gdx; 4 | import com.badlogic.gdx.files.FileHandle; 5 | import com.badlogic.gdx.scenes.scene2d.Actor; 6 | import com.badlogic.gdx.scenes.scene2d.Stage; 7 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 8 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 9 | import com.badlogic.gdx.scenes.scene2d.ui.TextButton; 10 | import com.badlogic.gdx.scenes.scene2d.ui.TextField; 11 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 12 | import com.nukethemoon.tools.opusproto.editor.Config; 13 | 14 | public class NewProjectDialog extends BaseDialog { 15 | 16 | private TextField textField; 17 | 18 | public NewProjectDialog(final Skin skin, final Stage stage) { 19 | super("create new project", skin); 20 | 21 | getContentTable().defaults().pad(15); 22 | getContentTable().add(new Label("project name:", skin)); 23 | textField = new TextField("", skin); 24 | getContentTable().add(textField); 25 | getContentTable().row(); 26 | 27 | TextButton createButton = new TextButton("create", skin); 28 | createButton.addListener(new ChangeListener() { 29 | @Override 30 | public void changed(ChangeEvent event, Actor actor) { 31 | if (textField.getText() == null || textField.getText().equals("")) { 32 | ErrorDialog errorDialog = new ErrorDialog("Invalid name.", skin); 33 | errorDialog.show(stage); 34 | } else { 35 | 36 | if (Gdx.files.local(Config.PROJECT_PATH + textField.getText()).exists()) { 37 | ErrorDialog errorDialog = new ErrorDialog("Project name already exists.", skin); 38 | errorDialog.show(stage); 39 | } else { 40 | Gdx.files.local(Config.PROJECT_PATH + textField.getText()).mkdirs(); 41 | FileHandle local = Gdx.files.local(Config.PROJECT_PATH + textField.getText() + Config.SAVE_FILE_NAME); 42 | 43 | listener.onResult(textField.getText()); 44 | hide(); 45 | } 46 | } 47 | } 48 | }); 49 | 50 | getContentTable().add(createButton).colspan(2); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/menu/tables/SnapshotTable.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.menu.tables; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.InputEvent; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 7 | import com.badlogic.gdx.scenes.scene2d.ui.Slider; 8 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 9 | import com.badlogic.gdx.scenes.scene2d.ui.TextButton; 10 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 11 | import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; 12 | import com.nukethemoon.tools.opusproto.sampler.Samplers; 13 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 14 | import com.nukethemoon.tools.opusproto.editor.message.CommandSnapshotChangeSettings; 15 | import com.nukethemoon.tools.opusproto.editor.message.CommandSnapshotDelete; 16 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 17 | 18 | public class SnapshotTable extends Table { 19 | 20 | private Samplers samplers; 21 | 22 | public SnapshotTable(Skin skin, Samplers samplers) { 23 | this.samplers = samplers; 24 | top().left(); 25 | setBackground(Styles.ITEM_BACKGROUND); 26 | 27 | final Label overlayLabel = new Label("snapshot", skin); 28 | add(overlayLabel); 29 | final Slider slider = new Slider(0f, 1f, 0.05f, false, skin); 30 | slider.setValue(0.75f); 31 | slider.addListener(new ChangeListener() { 32 | @Override 33 | public void changed(ChangeEvent event, Actor actor) { 34 | Editor.post(new CommandSnapshotChangeSettings(false, slider.getValue())); 35 | } 36 | }); 37 | 38 | add(slider).width(80).padLeft(4).padRight(4); 39 | 40 | TextButton closeButton = new TextButton("x", skin); 41 | closeButton.addListener(new ClickListener() { 42 | @Override 43 | public void clicked(InputEvent event, float x, float y) { 44 | Editor.post(new CommandSnapshotDelete()); 45 | SnapshotTable.this.setVisible(false); 46 | } 47 | }); 48 | add(closeButton).left().top(); 49 | 50 | pack(); 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /project/editor/data/docu/css/avenir-white.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: "Avenir Next", Helvetica, Arial, sans-serif; 3 | padding:1em; 4 | margin:auto; 5 | max-width:42em; 6 | background:#fefefe; 7 | } 8 | 9 | h1, h2, h3, h4, h5, h6 { 10 | font-weight: bold; 11 | } 12 | 13 | h1 { 14 | color: #000000; 15 | font-size: 28pt; 16 | } 17 | 18 | h2 { 19 | border-bottom: 1px solid #CCCCCC; 20 | color: #000000; 21 | font-size: 24px; 22 | } 23 | 24 | h3 { 25 | font-size: 18px; 26 | } 27 | 28 | h4 { 29 | font-size: 16px; 30 | } 31 | 32 | h5 { 33 | font-size: 14px; 34 | } 35 | 36 | h6 { 37 | color: #777777; 38 | background-color: inherit; 39 | font-size: 14px; 40 | } 41 | 42 | hr { 43 | height: 0.2em; 44 | border: 0; 45 | color: #CCCCCC; 46 | background-color: #CCCCCC; 47 | } 48 | 49 | p, blockquote, ul, ol, dl, li, table, pre { 50 | margin: 15px 0; 51 | } 52 | 53 | a, a:visited { 54 | color: #4183C4; 55 | background-color: inherit; 56 | text-decoration: none; 57 | } 58 | 59 | #message { 60 | border-radius: 6px; 61 | border: 1px solid #ccc; 62 | display:block; 63 | width:100%; 64 | height:60px; 65 | margin:6px 0px; 66 | } 67 | 68 | button, #ws { 69 | font-size: 10pt; 70 | padding: 4px 6px; 71 | border-radius: 5px; 72 | border: 1px solid #bbb; 73 | background-color: #eee; 74 | } 75 | 76 | code, pre, #ws, #message { 77 | font-family: Monaco; 78 | font-size: 10pt; 79 | border-radius: 3px; 80 | background-color: #F8F8F8; 81 | color: inherit; 82 | } 83 | 84 | code { 85 | border: 1px solid #EAEAEA; 86 | margin: 0 2px; 87 | padding: 0 5px; 88 | } 89 | 90 | pre { 91 | border: 1px solid #CCCCCC; 92 | overflow: auto; 93 | padding: 4px 8px; 94 | } 95 | 96 | pre > code { 97 | border: 0; 98 | margin: 0; 99 | padding: 0; 100 | } 101 | 102 | #ws { background-color: #f8f8f8; } 103 | 104 | .send { color:#77bb77; } 105 | .server { color:#7799bb; } 106 | .error { color:#AA0000; } -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-dune.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment { 7 | color: #999580; 8 | } 9 | 10 | /* Atelier-Dune Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #d73737; 25 | } 26 | 27 | /* Atelier-Dune Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #b65611; 35 | } 36 | 37 | /* Atelier-Dune Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #ae9513; 41 | } 42 | 43 | /* Atelier-Dune Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #60ac39; 51 | } 52 | 53 | /* Atelier-Dune Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #1fad83; 57 | } 58 | 59 | /* Atelier-Dune Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #6684e1; 69 | } 70 | 71 | /* Atelier-Dune Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #b854d4; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #20201d; 81 | color: #a6a28c; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-dune.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment { 7 | color: #7d7a68; 8 | } 9 | 10 | /* Atelier-Dune Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #d73737; 25 | } 26 | 27 | /* Atelier-Dune Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #b65611; 35 | } 36 | 37 | /* Atelier-Dune Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #ae9513; 41 | } 42 | 43 | /* Atelier-Dune Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #60ac39; 51 | } 52 | 53 | /* Atelier-Dune Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #1fad83; 57 | } 58 | 59 | /* Atelier-Dune Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #6684e1; 69 | } 70 | 71 | /* Atelier-Dune Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #b854d4; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #fefbec; 81 | color: #6e6b5e; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment { 8 | color: #969896; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-attribute, 14 | .hljs-tag, 15 | .hljs-regexp, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #cc6666; 25 | } 26 | 27 | /* Tomorrow Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-pragma, 31 | .hljs-built_in, 32 | .hljs-literal, 33 | .hljs-params, 34 | .hljs-constant { 35 | color: #de935f; 36 | } 37 | 38 | /* Tomorrow Yellow */ 39 | .ruby .hljs-class .hljs-title, 40 | .css .hljs-rule .hljs-attribute { 41 | color: #f0c674; 42 | } 43 | 44 | /* Tomorrow Green */ 45 | .hljs-string, 46 | .hljs-value, 47 | .hljs-inheritance, 48 | .hljs-header, 49 | .hljs-name, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #b5bd68; 53 | } 54 | 55 | /* Tomorrow Aqua */ 56 | .hljs-title, 57 | .css .hljs-hexcolor { 58 | color: #8abeb7; 59 | } 60 | 61 | /* Tomorrow Blue */ 62 | .hljs-function, 63 | .python .hljs-decorator, 64 | .python .hljs-title, 65 | .ruby .hljs-function .hljs-title, 66 | .ruby .hljs-title .hljs-keyword, 67 | .perl .hljs-sub, 68 | .javascript .hljs-title, 69 | .coffeescript .hljs-title { 70 | color: #81a2be; 71 | } 72 | 73 | /* Tomorrow Purple */ 74 | .hljs-keyword, 75 | .javascript .hljs-function { 76 | color: #b294bb; 77 | } 78 | 79 | .hljs { 80 | display: block; 81 | overflow-x: auto; 82 | background: #1d1f21; 83 | color: #c5c8c6; 84 | padding: 0.5em; 85 | -webkit-text-size-adjust: none; 86 | } 87 | 88 | .coffeescript .javascript, 89 | .javascript .xml, 90 | .tex .hljs-formula, 91 | .xml .javascript, 92 | .xml .vbscript, 93 | .xml .css, 94 | .xml .hljs-cdata { 95 | opacity: 0.5; 96 | } 97 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-heath.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Heath Comment */ 6 | .hljs-comment { 7 | color: #9e8f9e; 8 | } 9 | 10 | /* Atelier-Heath Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #ca402b; 25 | } 26 | 27 | /* Atelier-Heath Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #a65926; 35 | } 36 | 37 | /* Atelier-Heath Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #bb8a35; 41 | } 42 | 43 | /* Atelier-Heath Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #918b3b; 51 | } 52 | 53 | /* Atelier-Heath Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #159393; 57 | } 58 | 59 | /* Atelier-Heath Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #516aec; 69 | } 70 | 71 | /* Atelier-Heath Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #7b59c0; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #1b181b; 81 | color: #ab9bab; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-heath.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Heath Comment */ 6 | .hljs-comment { 7 | color: #776977; 8 | } 9 | 10 | /* Atelier-Heath Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #ca402b; 25 | } 26 | 27 | /* Atelier-Heath Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #a65926; 35 | } 36 | 37 | /* Atelier-Heath Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #bb8a35; 41 | } 42 | 43 | /* Atelier-Heath Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #918b3b; 51 | } 52 | 53 | /* Atelier-Heath Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #159393; 57 | } 58 | 59 | /* Atelier-Heath Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #516aec; 69 | } 70 | 71 | /* Atelier-Heath Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #7b59c0; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #f7f3f7; 81 | color: #695d69; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/tomorrow-night-blue.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Blue Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment { 8 | color: #7285b7; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-attribute, 14 | .hljs-tag, 15 | .hljs-regexp, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #ff9da4; 25 | } 26 | 27 | /* Tomorrow Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-pragma, 31 | .hljs-built_in, 32 | .hljs-literal, 33 | .hljs-params, 34 | .hljs-constant { 35 | color: #ffc58f; 36 | } 37 | 38 | /* Tomorrow Yellow */ 39 | .ruby .hljs-class .hljs-title, 40 | .css .hljs-rule .hljs-attribute { 41 | color: #ffeead; 42 | } 43 | 44 | /* Tomorrow Green */ 45 | .hljs-string, 46 | .hljs-value, 47 | .hljs-inheritance, 48 | .hljs-header, 49 | .hljs-name, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #d1f1a9; 53 | } 54 | 55 | /* Tomorrow Aqua */ 56 | .hljs-title, 57 | .css .hljs-hexcolor { 58 | color: #99ffff; 59 | } 60 | 61 | /* Tomorrow Blue */ 62 | .hljs-function, 63 | .python .hljs-decorator, 64 | .python .hljs-title, 65 | .ruby .hljs-function .hljs-title, 66 | .ruby .hljs-title .hljs-keyword, 67 | .perl .hljs-sub, 68 | .javascript .hljs-title, 69 | .coffeescript .hljs-title { 70 | color: #bbdaff; 71 | } 72 | 73 | /* Tomorrow Purple */ 74 | .hljs-keyword, 75 | .javascript .hljs-function { 76 | color: #ebbbff; 77 | } 78 | 79 | .hljs { 80 | display: block; 81 | overflow-x: auto; 82 | background: #002451; 83 | color: white; 84 | padding: 0.5em; 85 | -webkit-text-size-adjust: none; 86 | } 87 | 88 | .coffeescript .javascript, 89 | .javascript .xml, 90 | .tex .hljs-formula, 91 | .xml .javascript, 92 | .xml .vbscript, 93 | .xml .css, 94 | .xml .hljs-cdata { 95 | opacity: 0.5; 96 | } 97 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-forest.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Forest Comment */ 6 | .hljs-comment { 7 | color: #9c9491; 8 | } 9 | 10 | /* Atelier-Forest Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #f22c40; 25 | } 26 | 27 | /* Atelier-Forest Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #df5320; 35 | } 36 | 37 | /* Atelier-Forest Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #c38418; 41 | } 42 | 43 | /* Atelier-Forest Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #7b9726; 51 | } 52 | 53 | /* Atelier-Forest Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #3d97b8; 57 | } 58 | 59 | /* Atelier-Forest Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #407ee7; 69 | } 70 | 71 | /* Atelier-Forest Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #6666ea; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #1b1918; 81 | color: #a8a19f; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-forest.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Forest Comment */ 6 | .hljs-comment { 7 | color: #766e6b; 8 | } 9 | 10 | /* Atelier-Forest Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #f22c40; 25 | } 26 | 27 | /* Atelier-Forest Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #df5320; 35 | } 36 | 37 | /* Atelier-Forest Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #c38418; 41 | } 42 | 43 | /* Atelier-Forest Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #7b9726; 51 | } 52 | 53 | /* Atelier-Forest Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #3d97b8; 57 | } 58 | 59 | /* Atelier-Forest Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #407ee7; 69 | } 70 | 71 | /* Atelier-Forest Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #6666ea; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #f1efee; 81 | color: #68615e; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-seaside.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Seaside Comment */ 6 | .hljs-comment { 7 | color: #809980; 8 | } 9 | 10 | /* Atelier-Seaside Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #e6193c; 25 | } 26 | 27 | /* Atelier-Seaside Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #87711d; 35 | } 36 | 37 | /* Atelier-Seaside Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #98981b; 41 | } 42 | 43 | /* Atelier-Seaside Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #29a329; 51 | } 52 | 53 | /* Atelier-Seaside Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #1999b3; 57 | } 58 | 59 | /* Atelier-Seaside Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #3d62f5; 69 | } 70 | 71 | /* Atelier-Seaside Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #ad2bee; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #131513; 81 | color: #8ca68c; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-seaside.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Seaside Comment */ 6 | .hljs-comment { 7 | color: #687d68; 8 | } 9 | 10 | /* Atelier-Seaside Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #e6193c; 25 | } 26 | 27 | /* Atelier-Seaside Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #87711d; 35 | } 36 | 37 | /* Atelier-Seaside Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #98981b; 41 | } 42 | 43 | /* Atelier-Seaside Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #29a329; 51 | } 52 | 53 | /* Atelier-Seaside Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #1999b3; 57 | } 58 | 59 | /* Atelier-Seaside Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #3d62f5; 69 | } 70 | 71 | /* Atelier-Seaside Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #ad2bee; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #f4fbf4; 81 | color: #5e6e5e; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-lakeside.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Lakeside Comment */ 6 | .hljs-comment { 7 | color: #7195a8; 8 | } 9 | 10 | /* Atelier-Lakeside Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #d22d72; 25 | } 26 | 27 | /* Atelier-Lakeside Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #935c25; 35 | } 36 | 37 | /* Atelier-Lakeside Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #8a8a0f; 41 | } 42 | 43 | /* Atelier-Lakeside Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #568c3b; 51 | } 52 | 53 | /* Atelier-Lakeside Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #2d8f6f; 57 | } 58 | 59 | /* Atelier-Lakeside Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #257fad; 69 | } 70 | 71 | /* Atelier-Lakeside Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #6b6bb8; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #161b1d; 81 | color: #7ea2b4; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-lakeside.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Lakeside Comment */ 6 | .hljs-comment { 7 | color: #5a7b8c; 8 | } 9 | 10 | /* Atelier-Lakeside Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #d22d72; 25 | } 26 | 27 | /* Atelier-Lakeside Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #935c25; 35 | } 36 | 37 | /* Atelier-Lakeside Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #8a8a0f; 41 | } 42 | 43 | /* Atelier-Lakeside Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #568c3b; 51 | } 52 | 53 | /* Atelier-Lakeside Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #2d8f6f; 57 | } 58 | 59 | /* Atelier-Lakeside Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #257fad; 69 | } 70 | 71 | /* Atelier-Lakeside Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #6b6bb8; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #ebf8ff; 81 | color: #516d7b; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Opus prototype 8 | 9 | 10 | 11 |

12 | 13 | 14 |

Opus prototype

15 |

procedural world generation

16 | 17 | interpreter 18 | layer 19 | modifier 20 | overview 21 | sampler 22 | 23 | 24 | 25 | Opus prototype is a tool to generate infinite landscapes by combining noise artifacts. You can use the 26 | editor to create a world and use the library to import it to your own application. Opus prototype 27 | offers you a way to easily describe landscapes (like seen in Minecraft) with values that are based on 28 | pseudo random noise algorithms. 29 | 30 | 31 |

Layer

32 |

33 | 34 | A layer is a combination of noise values. The values are combined with operators. The result value is 35 | interpreted as a color using an interpreter. 36 |

37 | 38 |

Chunk

39 |

40 | 41 | A chunk is a stack of layers. It has a position in a grid of chunks. 42 |

43 | 44 |

World

45 |

46 | 47 | The world is a combination of chunks in two directions. 48 |

49 | 50 |

Links

51 | 52 | blog.runevision.com
53 | An article about the functional-, simulating- and planing -strategy for procedural world generation.
54 | fractal terrain generation
55 | ridgednoise editor
56 | redblobgames by
Einar Öberg
57 | 58 | 59 |

60 | 61 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-sulphurpool.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Sulphurpool Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Sulphurpool Comment */ 6 | .hljs-comment { 7 | color: #898ea4; 8 | } 9 | 10 | /* Atelier-Sulphurpool Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #c94922; 25 | } 26 | 27 | /* Atelier-Sulphurpool Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #c76b29; 35 | } 36 | 37 | /* Atelier-Sulphurpool Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #c08b30; 41 | } 42 | 43 | /* Atelier-Sulphurpool Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #ac9739; 51 | } 52 | 53 | /* Atelier-Sulphurpool Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #22a2c9; 57 | } 58 | 59 | /* Atelier-Sulphurpool Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #3d8fd1; 69 | } 70 | 71 | /* Atelier-Sulphurpool Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #6679cc; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #202746; 81 | color: #979db4; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-sulphurpool.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Sulphurpool Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Sulphurpool Comment */ 6 | .hljs-comment { 7 | color: #6b7394; 8 | } 9 | 10 | /* Atelier-Sulphurpool Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #c94922; 25 | } 26 | 27 | /* Atelier-Sulphurpool Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #c76b29; 35 | } 36 | 37 | /* Atelier-Sulphurpool Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #c08b30; 41 | } 42 | 43 | /* Atelier-Sulphurpool Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #ac9739; 51 | } 52 | 53 | /* Atelier-Sulphurpool Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #22a2c9; 57 | } 58 | 59 | /* Atelier-Sulphurpool Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #3d8fd1; 69 | } 70 | 71 | /* Atelier-Sulphurpool Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #6679cc; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #f5f7ff; 81 | color: #5e6687; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/solarized_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #002b36; 12 | color: #839496; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-comment, 17 | .diff .hljs-header, 18 | .hljs-doctype, 19 | .hljs-pi, 20 | .lisp .hljs-string { 21 | color: #586e75; 22 | } 23 | 24 | /* Solarized Green */ 25 | .hljs-keyword, 26 | .hljs-winutils, 27 | .method, 28 | .hljs-addition, 29 | .css .hljs-tag, 30 | .hljs-request, 31 | .hljs-status, 32 | .nginx .hljs-title { 33 | color: #859900; 34 | } 35 | 36 | /* Solarized Cyan */ 37 | .hljs-number, 38 | .hljs-command, 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-rule .hljs-value, 42 | .hljs-doctag, 43 | .tex .hljs-formula, 44 | .hljs-regexp, 45 | .hljs-hexcolor, 46 | .hljs-link_url { 47 | color: #2aa198; 48 | } 49 | 50 | /* Solarized Blue */ 51 | .hljs-title, 52 | .hljs-localvars, 53 | .hljs-chunk, 54 | .hljs-decorator, 55 | .hljs-built_in, 56 | .hljs-identifier, 57 | .vhdl .hljs-literal, 58 | .hljs-id, 59 | .css .hljs-function, 60 | .hljs-name { 61 | color: #268bd2; 62 | } 63 | 64 | /* Solarized Yellow */ 65 | .hljs-attribute, 66 | .hljs-variable, 67 | .lisp .hljs-body, 68 | .smalltalk .hljs-number, 69 | .hljs-constant, 70 | .hljs-class .hljs-title, 71 | .hljs-parent, 72 | .hljs-type, 73 | .hljs-link_reference { 74 | color: #b58900; 75 | } 76 | 77 | /* Solarized Orange */ 78 | .hljs-preprocessor, 79 | .hljs-preprocessor .hljs-keyword, 80 | .hljs-pragma, 81 | .hljs-shebang, 82 | .hljs-symbol, 83 | .hljs-symbol .hljs-string, 84 | .diff .hljs-change, 85 | .hljs-special, 86 | .hljs-attr_selector, 87 | .hljs-subst, 88 | .hljs-cdata, 89 | .css .hljs-pseudo, 90 | .hljs-header { 91 | color: #cb4b16; 92 | } 93 | 94 | /* Solarized Red */ 95 | .hljs-deletion, 96 | .hljs-important { 97 | color: #dc322f; 98 | } 99 | 100 | /* Solarized Violet */ 101 | .hljs-link_label { 102 | color: #6c71c4; 103 | } 104 | 105 | .tex .hljs-formula { 106 | background: #073642; 107 | } 108 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/solarized_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fdf6e3; 12 | color: #657b83; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-comment, 17 | .diff .hljs-header, 18 | .hljs-doctype, 19 | .hljs-pi, 20 | .lisp .hljs-string { 21 | color: #93a1a1; 22 | } 23 | 24 | /* Solarized Green */ 25 | .hljs-keyword, 26 | .hljs-winutils, 27 | .method, 28 | .hljs-addition, 29 | .css .hljs-tag, 30 | .hljs-request, 31 | .hljs-status, 32 | .nginx .hljs-title { 33 | color: #859900; 34 | } 35 | 36 | /* Solarized Cyan */ 37 | .hljs-number, 38 | .hljs-command, 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-rule .hljs-value, 42 | .hljs-doctag, 43 | .tex .hljs-formula, 44 | .hljs-regexp, 45 | .hljs-hexcolor, 46 | .hljs-link_url { 47 | color: #2aa198; 48 | } 49 | 50 | /* Solarized Blue */ 51 | .hljs-title, 52 | .hljs-localvars, 53 | .hljs-chunk, 54 | .hljs-decorator, 55 | .hljs-built_in, 56 | .hljs-identifier, 57 | .vhdl .hljs-literal, 58 | .hljs-id, 59 | .css .hljs-function, 60 | .hljs-name { 61 | color: #268bd2; 62 | } 63 | 64 | /* Solarized Yellow */ 65 | .hljs-attribute, 66 | .hljs-variable, 67 | .lisp .hljs-body, 68 | .smalltalk .hljs-number, 69 | .hljs-constant, 70 | .hljs-class .hljs-title, 71 | .hljs-parent, 72 | .hljs-type, 73 | .hljs-link_reference { 74 | color: #b58900; 75 | } 76 | 77 | /* Solarized Orange */ 78 | .hljs-preprocessor, 79 | .hljs-preprocessor .hljs-keyword, 80 | .hljs-pragma, 81 | .hljs-shebang, 82 | .hljs-symbol, 83 | .hljs-symbol .hljs-string, 84 | .diff .hljs-change, 85 | .hljs-special, 86 | .hljs-attr_selector, 87 | .hljs-subst, 88 | .hljs-cdata, 89 | .css .hljs-pseudo, 90 | .hljs-header { 91 | color: #cb4b16; 92 | } 93 | 94 | /* Solarized Red */ 95 | .hljs-deletion, 96 | .hljs-important { 97 | color: #dc322f; 98 | } 99 | 100 | /* Solarized Violet */ 101 | .hljs-link_label { 102 | color: #6c71c4; 103 | } 104 | 105 | .tex .hljs-formula { 106 | background: #eee8d5; 107 | } 108 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/previews/SamplerHoverPreviewElement.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler.previews; 2 | 3 | 4 | import com.badlogic.gdx.scenes.scene2d.Actor; 5 | import com.badlogic.gdx.scenes.scene2d.InputEvent; 6 | import com.badlogic.gdx.scenes.scene2d.Stage; 7 | import com.badlogic.gdx.scenes.scene2d.ui.Image; 8 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 9 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 10 | import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; 11 | import com.nukethemoon.tools.opusproto.sampler.AbstractSampler; 12 | 13 | public class SamplerHoverPreviewElement extends Table { 14 | 15 | 16 | private Image hoverImage; 17 | private int size; 18 | private AbstractSampler sampler; 19 | private final SamplerPreviewImage previewImage; 20 | 21 | 22 | public SamplerHoverPreviewElement(Skin skin, int size, final Stage stage) { 23 | super(skin); 24 | this.size = size; 25 | previewImage = new SamplerPreviewImage(); 26 | 27 | if (stage != null) { 28 | previewImage.addListener(new ClickListener() { 29 | @Override 30 | public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) { 31 | hoverImage = new Image(SamplerPreviewImage.create(sampler, 400, false)); 32 | stage.addActor(hoverImage); 33 | hoverImage.setPosition(event.getStageX() - hoverImage.getWidth() - 10, 34 | event.getStageY() - hoverImage.getHeight() - 10); 35 | } 36 | 37 | @Override 38 | public void exit(InputEvent event, float x, float y, int pointer, Actor toActor) { 39 | if (hoverImage != null) { 40 | hoverImage.remove(); 41 | } 42 | } 43 | 44 | @Override 45 | public boolean mouseMoved(InputEvent event, float x, float y) { 46 | if (hoverImage != null) { 47 | hoverImage.setPosition(event.getStageX() - hoverImage.getWidth() - 10, 48 | event.getStageY() - hoverImage.getHeight() - 10); 49 | } 50 | return false; 51 | } 52 | }); 53 | } 54 | add(previewImage); 55 | } 56 | 57 | 58 | 59 | public void applySampler(AbstractSampler sampler) { 60 | this.sampler = sampler; 61 | previewImage.applySampler(sampler, size, true); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Pojoaque Style by Jason Tate 4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 5 | Based on Solarized Style from http://ethanschoonover.com/solarized 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | color: #dccf8f; 14 | background: url(./pojoaque.jpg) repeat scroll left top #181914; 15 | -webkit-text-size-adjust: none; 16 | } 17 | 18 | .hljs-comment, 19 | .diff .hljs-header, 20 | .hljs-doctype, 21 | .lisp .hljs-string { 22 | color: #586e75; 23 | font-style: italic; 24 | } 25 | 26 | .hljs-keyword, 27 | .css .rule .hljs-keyword, 28 | .hljs-winutils, 29 | .javascript .hljs-title, 30 | .method, 31 | .hljs-addition, 32 | .css .hljs-tag, 33 | .hljs-list .hljs-keyword, 34 | .nginx .hljs-title { 35 | color: #b64926; 36 | } 37 | 38 | .hljs-number, 39 | .hljs-command, 40 | .hljs-string, 41 | .hljs-tag .hljs-value, 42 | .hljs-doctag, 43 | .tex .hljs-formula, 44 | .hljs-regexp, 45 | .hljs-hexcolor { 46 | color: #468966; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-localvars, 51 | .hljs-function .hljs-title, 52 | .hljs-chunk, 53 | .hljs-decorator, 54 | .hljs-built_in, 55 | .hljs-identifier, 56 | .hljs-name, 57 | .hljs-id { 58 | color: #ffb03b; 59 | } 60 | 61 | .hljs-attribute, 62 | .hljs-variable, 63 | .lisp .hljs-body, 64 | .smalltalk .hljs-number, 65 | .hljs-constant, 66 | .hljs-class .hljs-title, 67 | .hljs-parent, 68 | .hljs-type { 69 | color: #b58900; 70 | } 71 | 72 | .css .hljs-attribute { 73 | color: #b89859; 74 | } 75 | 76 | .css .hljs-number, 77 | .css .hljs-hexcolor { 78 | color: #dccf8f; 79 | } 80 | 81 | .css .hljs-class { 82 | color: #d3a60c; 83 | } 84 | 85 | .hljs-preprocessor, 86 | .hljs-pragma, 87 | .hljs-pi, 88 | .hljs-shebang, 89 | .hljs-symbol, 90 | .hljs-symbol .hljs-string, 91 | .diff .hljs-change, 92 | .hljs-special, 93 | .hljs-attr_selector, 94 | .hljs-important, 95 | .hljs-subst, 96 | .hljs-cdata { 97 | color: #cb4b16; 98 | } 99 | 100 | .hljs-deletion { 101 | color: #dc322f; 102 | } 103 | 104 | .tex .hljs-formula { 105 | background: #073642; 106 | } 107 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #444; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-keyword, 16 | .hljs-literal, 17 | .hljs-change, 18 | .hljs-winutils, 19 | .hljs-flow, 20 | .nginx .hljs-title, 21 | .tex .hljs-special { 22 | color: white; 23 | } 24 | 25 | .hljs, 26 | .hljs-subst { 27 | color: #ddd; 28 | } 29 | 30 | .hljs-string, 31 | .hljs-title, 32 | .hljs-type, 33 | .ini .hljs-title, 34 | .hljs-tag .hljs-value, 35 | .css .hljs-rule .hljs-value, 36 | .hljs-preprocessor, 37 | .hljs-pragma, 38 | .ruby .hljs-symbol, 39 | .ruby .hljs-symbol .hljs-string, 40 | .ruby .hljs-class .hljs-parent, 41 | .hljs-built_in, 42 | .django .hljs-template_tag, 43 | .django .hljs-variable, 44 | .smalltalk .hljs-class, 45 | .ruby .hljs-string, 46 | .django .hljs-filter .hljs-argument, 47 | .smalltalk .hljs-localvars, 48 | .smalltalk .hljs-array, 49 | .hljs-attr_selector, 50 | .hljs-pseudo, 51 | .hljs-addition, 52 | .hljs-stream, 53 | .hljs-envvar, 54 | .apache .hljs-tag, 55 | .apache .hljs-cbracket, 56 | .tex .hljs-command, 57 | .hljs-prompt, 58 | .coffeescript .hljs-attribute, 59 | .hljs-name { 60 | color: #d88; 61 | } 62 | 63 | .hljs-comment, 64 | .hljs-annotation, 65 | .hljs-decorator, 66 | .hljs-pi, 67 | .hljs-doctype, 68 | .hljs-deletion, 69 | .hljs-shebang, 70 | .apache .hljs-sqbracket, 71 | .tex .hljs-formula { 72 | color: #777; 73 | } 74 | 75 | .hljs-keyword, 76 | .hljs-literal, 77 | .hljs-title, 78 | .css .hljs-id, 79 | .hljs-doctag, 80 | .hljs-type, 81 | .vbscript .hljs-built_in, 82 | .rsl .hljs-built_in, 83 | .smalltalk .hljs-class, 84 | .diff .hljs-header, 85 | .hljs-chunk, 86 | .hljs-winutils, 87 | .bash .hljs-variable, 88 | .apache .hljs-tag, 89 | .tex .hljs-special, 90 | .hljs-request, 91 | .hljs-status { 92 | font-weight: bold; 93 | } 94 | 95 | .coffeescript .javascript, 96 | .javascript .xml, 97 | .tex .hljs-formula, 98 | .xml .javascript, 99 | .xml .vbscript, 100 | .xml .css, 101 | .xml .hljs-cdata { 102 | opacity: 0.5; 103 | } 104 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/brown_paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background:#b7a68e url(./brown_papersq.png); 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-keyword, 16 | .hljs-literal, 17 | .hljs-change, 18 | .hljs-winutils, 19 | .hljs-flow, 20 | .nginx .hljs-title, 21 | .tex .hljs-special, 22 | .hljs-request, 23 | .hljs-status { 24 | color:#005599; 25 | font-weight:bold; 26 | } 27 | 28 | .hljs, 29 | .hljs-subst, 30 | .hljs-tag .hljs-keyword { 31 | color: #363c69; 32 | } 33 | 34 | .hljs-string, 35 | .hljs-title, 36 | .hljs-type, 37 | .hljs-tag .hljs-value, 38 | .css .hljs-rule .hljs-value, 39 | .hljs-preprocessor, 40 | .hljs-pragma, 41 | .ruby .hljs-symbol, 42 | .ruby .hljs-symbol .hljs-string, 43 | .ruby .hljs-class .hljs-parent, 44 | .hljs-built_in, 45 | .django .hljs-template_tag, 46 | .django .hljs-variable, 47 | .smalltalk .hljs-class, 48 | .ruby .hljs-string, 49 | .django .hljs-filter .hljs-argument, 50 | .smalltalk .hljs-localvars, 51 | .smalltalk .hljs-array, 52 | .hljs-attr_selector, 53 | .hljs-pseudo, 54 | .hljs-addition, 55 | .hljs-stream, 56 | .hljs-envvar, 57 | .apache .hljs-tag, 58 | .apache .hljs-cbracket, 59 | .tex .hljs-number, 60 | .hljs-name { 61 | color: #2c009f; 62 | } 63 | 64 | .hljs-comment, 65 | .hljs-annotation, 66 | .hljs-decorator, 67 | .hljs-pi, 68 | .hljs-doctype, 69 | .hljs-deletion, 70 | .hljs-shebang, 71 | .apache .hljs-sqbracket, 72 | .nginx .hljs-built_in, 73 | .tex .hljs-formula { 74 | color: #802022; 75 | } 76 | 77 | .hljs-keyword, 78 | .hljs-literal, 79 | .css .hljs-id, 80 | .hljs-doctag, 81 | .hljs-title, 82 | .hljs-type, 83 | .vbscript .hljs-built_in, 84 | .rsl .hljs-built_in, 85 | .smalltalk .hljs-class, 86 | .diff .hljs-header, 87 | .hljs-chunk, 88 | .hljs-winutils, 89 | .bash .hljs-variable, 90 | .apache .hljs-tag, 91 | .tex .hljs-command { 92 | font-weight: bold; 93 | } 94 | 95 | .coffeescript .javascript, 96 | .javascript .xml, 97 | .tex .hljs-formula, 98 | .xml .javascript, 99 | .xml .vbscript, 100 | .xml .css, 101 | .xml .hljs-cdata { 102 | opacity: 0.8; 103 | } 104 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/dialogs/LoadDialog.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.dialogs; 2 | 3 | import com.badlogic.gdx.Gdx; 4 | import com.badlogic.gdx.Input; 5 | import com.badlogic.gdx.files.FileHandle; 6 | import com.badlogic.gdx.scenes.scene2d.ui.List; 7 | import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; 8 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 9 | import com.nukethemoon.tools.opusproto.editor.Config; 10 | 11 | import java.io.File; 12 | import java.io.FileFilter; 13 | 14 | public class LoadDialog extends BaseDialog { 15 | 16 | private List uiList = null; 17 | private String path; 18 | 19 | public LoadDialog(String path, Skin skin) { 20 | super("Load from " + Config.PROJECT_PATH + path, skin); 21 | this.path = path; 22 | FileHandle internal = Gdx.files.local(Config.PROJECT_PATH + path); 23 | 24 | String errorText = null; 25 | if (!internal.exists()) { 26 | errorText = "Directory not found '" + internal.path() + "'"; 27 | } 28 | 29 | FileHandle[] list = internal.list(new FileFilter() { 30 | @Override 31 | public boolean accept(File pathname) { 32 | return pathname.isFile(); 33 | } 34 | }); 35 | 36 | if (list.length == 0) { 37 | errorText = "No files found in '" + internal.path() + "'"; 38 | } 39 | if (errorText != null) { 40 | text(errorText); 41 | button("OK", false); 42 | key(Input.Keys.ENTER, false); 43 | key(Input.Keys.ESCAPE, false); 44 | return; 45 | } 46 | 47 | uiList = new List(skin); 48 | 49 | String[] fileNames = new String[list.length]; 50 | for (int i = 0; i < list.length; i++) { 51 | FileHandle file = list[i]; 52 | fileNames[i] = file.name(); 53 | } 54 | uiList.setItems(fileNames); 55 | 56 | ScrollPane pane = new ScrollPane(uiList, skin); 57 | pane.setFadeScrollBars(false); 58 | pane.setSize(300, 300); 59 | 60 | getContentTable().add(pane).top(); 61 | getContentTable().defaults().pad(2); 62 | 63 | 64 | 65 | button("load", true); 66 | button("cancel", false); 67 | key(Input.Keys.ENTER, true); 68 | key(Input.Keys.ESCAPE, false); 69 | } 70 | 71 | 72 | @Override 73 | protected void result(Object object) { 74 | resultValue = Config.PROJECT_PATH + path + "/" + uiList.getSelected(); 75 | super.result(object); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #f8f8f8; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-comment, 17 | .diff .hljs-header { 18 | color: #998; 19 | font-style: italic; 20 | } 21 | 22 | .hljs-keyword, 23 | .css .rule .hljs-keyword, 24 | .hljs-winutils, 25 | .nginx .hljs-title, 26 | .hljs-subst, 27 | .hljs-request, 28 | .hljs-status { 29 | color: #333; 30 | font-weight: bold; 31 | } 32 | 33 | .hljs-number, 34 | .hljs-hexcolor, 35 | .ruby .hljs-constant { 36 | color: #008080; 37 | } 38 | 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-doctag, 42 | .tex .hljs-formula { 43 | color: #d14; 44 | } 45 | 46 | .hljs-title, 47 | .hljs-id, 48 | .scss .hljs-preprocessor { 49 | color: #900; 50 | font-weight: bold; 51 | } 52 | 53 | .hljs-list .hljs-keyword, 54 | .hljs-subst { 55 | font-weight: normal; 56 | } 57 | 58 | .hljs-class .hljs-title, 59 | .hljs-type, 60 | .vhdl .hljs-literal, 61 | .tex .hljs-command { 62 | color: #458; 63 | font-weight: bold; 64 | } 65 | 66 | .hljs-tag, 67 | .hljs-tag .hljs-title, 68 | .hljs-rule .hljs-property, 69 | .django .hljs-tag .hljs-keyword { 70 | color: #000080; 71 | font-weight: normal; 72 | } 73 | 74 | .hljs-attribute, 75 | .hljs-variable, 76 | .lisp .hljs-body, 77 | .hljs-name { 78 | color: #008080; 79 | } 80 | 81 | .hljs-regexp { 82 | color: #009926; 83 | } 84 | 85 | .hljs-symbol, 86 | .ruby .hljs-symbol .hljs-string, 87 | .lisp .hljs-keyword, 88 | .clojure .hljs-keyword, 89 | .scheme .hljs-keyword, 90 | .tex .hljs-special, 91 | .hljs-prompt { 92 | color: #990073; 93 | } 94 | 95 | .hljs-built_in { 96 | color: #0086b3; 97 | } 98 | 99 | .hljs-preprocessor, 100 | .hljs-pragma, 101 | .hljs-pi, 102 | .hljs-doctype, 103 | .hljs-shebang, 104 | .hljs-cdata { 105 | color: #999; 106 | font-weight: bold; 107 | } 108 | 109 | .hljs-deletion { 110 | background: #fdd; 111 | } 112 | 113 | .hljs-addition { 114 | background: #dfd; 115 | } 116 | 117 | .diff .hljs-change { 118 | background: #0086b3; 119 | } 120 | 121 | .hljs-chunk { 122 | color: #aaa; 123 | } 124 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/region/Chunk.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.region; 2 | 3 | public class Chunk { 4 | 5 | private int width; 6 | private int height; 7 | 8 | private int originalWidth; // width without resolution 9 | private int originalHeight; // height without resolution 10 | 11 | private int offsetX; 12 | private int offsetY; 13 | 14 | private float[][][] layerData; 15 | private float resolution; 16 | 17 | 18 | 19 | private int overlap; 20 | 21 | public Chunk(int width, int height, int offsetX, int offsetY, int layerCount, float resolution, int overlap) { 22 | this.resolution = resolution; 23 | this.originalHeight = height; 24 | this.originalWidth = width; 25 | this.overlap = overlap; 26 | this.width = Math.round((width ) / resolution); 27 | this.height = Math.round((height) / resolution); 28 | this.offsetX = offsetX; 29 | this.offsetY = offsetY; 30 | layerData = new float[layerCount][this.width][this.height]; 31 | } 32 | 33 | public float getAbsolute(int pX, int pY, int layerIndex) { 34 | return getRelative(pX - offsetX, pY - offsetY, layerIndex); 35 | } 36 | 37 | public float getRelative(int pX, int pY, int layerIndex) { 38 | return layerData[layerIndex][pX][pY]; 39 | } 40 | 41 | public void setAbsolute(int pX, int pY, int layerIndex, float value) { 42 | setRelative(pX - offsetX, pY - offsetY, layerIndex, value); 43 | } 44 | 45 | public void setRelative(int pX, int pY, int layerIndex, float value) { 46 | layerData[layerIndex][pX][pY] = value; 47 | } 48 | 49 | public int getHeight() { 50 | return height; 51 | } 52 | 53 | public int getWidth() { 54 | return width; 55 | } 56 | 57 | public int getOffsetX() { 58 | return offsetX; 59 | } 60 | 61 | public int getOffsetY() { 62 | return offsetY; 63 | } 64 | 65 | public int getChunkX() { 66 | return getOffsetX() / originalWidth; 67 | } 68 | 69 | public int getChunkY() { 70 | return getOffsetY() / originalHeight; 71 | } 72 | 73 | public float[][][] getLayerData() { 74 | return layerData; 75 | } 76 | 77 | public float getResolution() { 78 | return resolution; 79 | } 80 | 81 | public int getOriginalWidth() { 82 | return originalWidth; 83 | } 84 | 85 | public int getOriginalHeight() { 86 | return originalHeight; 87 | } 88 | 89 | public int getOverlap() { 90 | return overlap; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/AbstractSamplerForm.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 5 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 6 | import com.nukethemoon.tools.opusproto.editor.ui.AbstractChangeForm; 7 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 8 | import com.nukethemoon.tools.opusproto.editor.ui.dialogs.ErrorDialog; 9 | import com.nukethemoon.tools.opusproto.exceptions.SamplerRecursionException; 10 | import com.nukethemoon.tools.opusproto.sampler.AbstractSampler; 11 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 12 | import com.nukethemoon.tools.opusproto.sampler.Samplers; 13 | import com.nukethemoon.tools.opusproto.log.Log; 14 | 15 | public abstract class AbstractSamplerForm extends AbstractChangeForm { 16 | 17 | 18 | protected final Table contentTable; 19 | protected Samplers samplers; 20 | protected AbstractSampler sampler; 21 | 22 | 23 | public AbstractSamplerForm(final Skin skin, final AbstractSampler sampler, Samplers pool) { 24 | super(skin); 25 | this.samplers = pool; 26 | this.sampler = sampler; 27 | left().top(); 28 | contentTable = new Table(skin); 29 | contentTable.top().left(); 30 | add(contentTable).top().left(); 31 | row(); 32 | pack(); 33 | } 34 | 35 | public boolean canAddSamplerToSampler(AbstractSampler parent, AbstractSampler child) { 36 | 37 | if (child.getConfig().id.equals(parent.getConfig().id)) { 38 | ErrorDialog dialog = new ErrorDialog("You can not select this sampler. Parent and child sampler must not be the same.", Styles.UI_SKIN); 39 | dialog.show(Editor.STAGE); 40 | return false; 41 | } 42 | try { 43 | if (samplers.doesSecondDependOnFirst(parent, child)) { 44 | ErrorDialog dialog = new ErrorDialog("You can not select this sampler. It would create a circular dependency.", Styles.UI_SKIN); 45 | dialog.show(Editor.STAGE); 46 | return false; 47 | } 48 | } catch (SamplerRecursionException e) { 49 | Log.e(AbstractSamplerForm.class, e.getMessage()); 50 | return false; 51 | } 52 | 53 | return true; 54 | } 55 | 56 | public abstract boolean applyToConfig(AbstractSamplerConfiguration config); 57 | 58 | public abstract void loadFromConfig(AbstractSamplerConfiguration config); 59 | } 60 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000080; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst { 17 | color: #0ff; 18 | } 19 | 20 | .hljs-string, 21 | .ruby .hljs-string, 22 | .haskell .hljs-type, 23 | .hljs-tag .hljs-value, 24 | .hljs-rule .hljs-value, 25 | .hljs-rule .hljs-value .hljs-number, 26 | .hljs-preprocessor, 27 | .hljs-pragma, 28 | .ruby .hljs-symbol, 29 | .ruby .hljs-symbol .hljs-string, 30 | .hljs-built_in, 31 | .django .hljs-template_tag, 32 | .django .hljs-variable, 33 | .smalltalk .hljs-class, 34 | .hljs-addition, 35 | .apache .hljs-tag, 36 | .apache .hljs-cbracket, 37 | .tex .hljs-command, 38 | .coffeescript .hljs-attribute { 39 | color: #ff0; 40 | } 41 | 42 | .hljs-keyword, 43 | .css .hljs-id, 44 | .hljs-title, 45 | .hljs-type, 46 | .vbscript .hljs-built_in, 47 | .rsl .hljs-built_in, 48 | .smalltalk .hljs-class, 49 | .xml .hljs-tag .hljs-title, 50 | .hljs-winutils, 51 | .hljs-flow, 52 | .hljs-change, 53 | .hljs-envvar, 54 | .bash .hljs-variable, 55 | .tex .hljs-special, 56 | .hljs-name { 57 | color: #fff; 58 | } 59 | 60 | .hljs-comment, 61 | .hljs-doctag, 62 | .hljs-annotation, 63 | .hljs-deletion, 64 | .apache .hljs-sqbracket, 65 | .tex .hljs-formula { 66 | color: #888; 67 | } 68 | 69 | .hljs-number, 70 | .hljs-date, 71 | .hljs-regexp, 72 | .hljs-literal, 73 | .smalltalk .hljs-symbol, 74 | .smalltalk .hljs-char, 75 | .clojure .hljs-attribute { 76 | color: #0f0; 77 | } 78 | 79 | .hljs-decorator, 80 | .django .hljs-filter .hljs-argument, 81 | .smalltalk .hljs-localvars, 82 | .smalltalk .hljs-array, 83 | .hljs-attr_selector, 84 | .hljs-pseudo, 85 | .xml .hljs-pi, 86 | .diff .hljs-header, 87 | .hljs-chunk, 88 | .hljs-shebang, 89 | .nginx .hljs-built_in, 90 | .hljs-prompt { 91 | color: #008080; 92 | } 93 | 94 | .hljs-keyword, 95 | .css .hljs-id, 96 | .hljs-title, 97 | .hljs-type, 98 | .vbscript .hljs-built_in, 99 | .rsl .hljs-built_in, 100 | .smalltalk .hljs-class, 101 | .hljs-winutils, 102 | .hljs-flow, 103 | .apache .hljs-tag, 104 | .nginx .hljs-built_in, 105 | .tex .hljs-command, 106 | .tex .hljs-special, 107 | .hljs-request, 108 | .hljs-status { 109 | font-weight: bold; 110 | } 111 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/formular/noise/NoiseSamplerForm.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler.formular.noise; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 5 | import com.badlogic.gdx.scenes.scene2d.ui.SelectBox; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 7 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 8 | import com.nukethemoon.tools.opusproto.sampler.Samplers; 9 | import com.nukethemoon.tools.opusproto.editor.app.Editor; 10 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 11 | import com.nukethemoon.tools.opusproto.editor.ui.sampler.AbstractSamplerForm; 12 | import com.nukethemoon.tools.opusproto.sampler.AbstractSampler; 13 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 14 | import com.nukethemoon.tools.opusproto.sampler.noise.NoiseConfig; 15 | 16 | 17 | public class NoiseSamplerForm extends AbstractSamplerForm { 18 | 19 | private final SelectBox algorithmSelect; 20 | private Skin skin; 21 | 22 | public NoiseSamplerForm(Skin skin, AbstractSampler sampler, Samplers pool) { 23 | super(skin, sampler, pool); 24 | this.skin = skin; 25 | defaults().center().pad(5); 26 | setBackground(Styles.INNER_BACKGROUND); 27 | 28 | 29 | Label algorithmLabel = new Label("algorithm", skin); 30 | add(algorithmLabel); 31 | 32 | algorithmSelect = new SelectBox(skin); 33 | String[] algorithmNames = new String[Editor.KNOWN_ALGORITHMS.keySet().size()]; 34 | Editor.KNOWN_ALGORITHMS.keySet().toArray(algorithmNames); 35 | algorithmSelect.setItems(algorithmNames); 36 | algorithmSelect.addListener(new ChangeListener() { 37 | @Override 38 | public void changed(ChangeEvent event, Actor actor) { 39 | notifyChanges(); 40 | } 41 | }); 42 | 43 | add(algorithmSelect); 44 | 45 | 46 | loadFromConfig(sampler.getConfig()); 47 | notifyChanges(); 48 | } 49 | 50 | @Override 51 | public boolean applyToConfig(AbstractSamplerConfiguration config) { 52 | NoiseConfig c = (NoiseConfig) config; 53 | c.noiseAlgorithmName = (String) algorithmSelect.getSelected(); 54 | return true; 55 | } 56 | 57 | 58 | @Override 59 | public void loadFromConfig(AbstractSamplerConfiguration config) { 60 | NoiseConfig c = (NoiseConfig) config; 61 | algorithmSelect.setSelected(c.noiseAlgorithmName); 62 | 63 | } 64 | 65 | 66 | 67 | } 68 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/foundation.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Foundation 4 docs style for highlight.js 3 | Author: Dan Allen 4 | Website: http://foundation.zurb.com/docs/ 5 | Version: 1.0 6 | Date: 2013-04-02 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #eee; 14 | -webkit-text-size-adjust: none; 15 | } 16 | 17 | .hljs-header, 18 | .hljs-decorator, 19 | .hljs-annotation { 20 | color: #000077; 21 | } 22 | 23 | .hljs-horizontal_rule, 24 | .hljs-link_url, 25 | .hljs-emphasis, 26 | .hljs-attribute { 27 | color: #070; 28 | } 29 | 30 | .hljs-emphasis { 31 | font-style: italic; 32 | } 33 | 34 | .hljs-link_label, 35 | .hljs-strong, 36 | .hljs-value, 37 | .hljs-string, 38 | .scss .hljs-value .hljs-string { 39 | color: #d14; 40 | } 41 | 42 | .hljs-strong { 43 | font-weight: bold; 44 | } 45 | 46 | .hljs-blockquote, 47 | .hljs-comment { 48 | color: #998; 49 | font-style: italic; 50 | } 51 | 52 | .asciidoc .hljs-title, 53 | .hljs-function .hljs-title { 54 | color: #900; 55 | } 56 | 57 | .hljs-class { 58 | color: #458; 59 | } 60 | 61 | .hljs-id, 62 | .hljs-pseudo, 63 | .hljs-constant, 64 | .hljs-hexcolor { 65 | color: teal; 66 | } 67 | 68 | .hljs-variable { 69 | color: #336699; 70 | } 71 | 72 | .hljs-bullet { 73 | color: #997700; 74 | } 75 | 76 | .hljs-pi, 77 | .hljs-doctype { 78 | color: #3344bb; 79 | } 80 | 81 | .hljs-code, 82 | .hljs-number { 83 | color: #099; 84 | } 85 | 86 | .hljs-important { 87 | color: #f00; 88 | } 89 | 90 | .smartquote, 91 | .hljs-label { 92 | color: #970; 93 | } 94 | 95 | .hljs-preprocessor, 96 | .hljs-pragma { 97 | color: #579; 98 | } 99 | 100 | .hljs-reserved, 101 | .hljs-keyword, 102 | .scss .hljs-value { 103 | color: #000; 104 | } 105 | 106 | .hljs-regexp { 107 | background-color: #fff0ff; 108 | color: #880088; 109 | } 110 | 111 | .hljs-symbol { 112 | color: #990073; 113 | } 114 | 115 | .hljs-symbol .hljs-string { 116 | color: #a60; 117 | } 118 | 119 | .hljs-tag { 120 | color: #007700; 121 | } 122 | 123 | .hljs-at_rule, 124 | .hljs-at_rule .hljs-keyword { 125 | color: #088; 126 | } 127 | 128 | .hljs-at_rule .hljs-preprocessor { 129 | color: #808; 130 | } 131 | 132 | .scss .hljs-tag, 133 | .scss .hljs-attribute { 134 | color: #339; 135 | } 136 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/idea.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Intellij Idea-like styling (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #000; 12 | background: #fff; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-subst, 17 | .hljs-title, 18 | .json .hljs-value { 19 | font-weight: normal; 20 | color: #000; 21 | } 22 | 23 | .hljs-comment, 24 | .diff .hljs-header { 25 | color: #808080; 26 | font-style: italic; 27 | } 28 | 29 | .hljs-annotation, 30 | .hljs-decorator, 31 | .hljs-preprocessor, 32 | .hljs-pragma, 33 | .hljs-doctype, 34 | .hljs-pi, 35 | .hljs-chunk, 36 | .hljs-shebang, 37 | .apache .hljs-cbracket, 38 | .hljs-prompt, 39 | .http .hljs-title { 40 | color: #808000; 41 | } 42 | 43 | .hljs-tag, 44 | .hljs-pi { 45 | background: #efefef; 46 | } 47 | 48 | .hljs-tag .hljs-title, 49 | .hljs-id, 50 | .hljs-attr_selector, 51 | .hljs-pseudo, 52 | .hljs-literal, 53 | .hljs-keyword, 54 | .hljs-hexcolor, 55 | .css .hljs-function, 56 | .ini .hljs-title, 57 | .css .hljs-class, 58 | .hljs-list .hljs-keyword, 59 | .nginx .hljs-title, 60 | .tex .hljs-command, 61 | .hljs-request, 62 | .hljs-status { 63 | font-weight: bold; 64 | color: #000080; 65 | } 66 | 67 | .hljs-attribute, 68 | .hljs-rule .hljs-keyword, 69 | .hljs-number, 70 | .hljs-date, 71 | .hljs-regexp, 72 | .tex .hljs-special { 73 | font-weight: bold; 74 | color: #0000ff; 75 | } 76 | 77 | .hljs-number, 78 | .hljs-regexp { 79 | font-weight: normal; 80 | } 81 | 82 | .hljs-string, 83 | .hljs-value, 84 | .hljs-filter .hljs-argument, 85 | .css .hljs-function .hljs-params, 86 | .apache .hljs-tag { 87 | color: #008000; 88 | font-weight: bold; 89 | } 90 | 91 | .hljs-symbol, 92 | .ruby .hljs-symbol .hljs-string, 93 | .hljs-char, 94 | .tex .hljs-formula { 95 | color: #000; 96 | background: #d0eded; 97 | font-style: italic; 98 | } 99 | 100 | .hljs-doctag { 101 | text-decoration: underline; 102 | } 103 | 104 | .hljs-variable, 105 | .hljs-envvar, 106 | .apache .hljs-sqbracket, 107 | .nginx .hljs-built_in, 108 | .hljs-name { 109 | color: #660e7a; 110 | } 111 | 112 | .hljs-addition { 113 | background: #baeeba; 114 | } 115 | 116 | .hljs-deletion { 117 | background: #ffc8bd; 118 | } 119 | 120 | .diff .hljs-change { 121 | background: #bccff9; 122 | } 123 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/sampler/formular/FlatSamplerForm.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.sampler.formular; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 6 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 7 | import com.badlogic.gdx.scenes.scene2d.ui.TextField; 8 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; 9 | import com.nukethemoon.tools.opusproto.sampler.Samplers; 10 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 11 | import com.nukethemoon.tools.opusproto.editor.ui.sampler.AbstractSamplerForm; 12 | import com.nukethemoon.tools.opusproto.editor.ui.sampler.CursorTextField; 13 | import com.nukethemoon.tools.opusproto.sampler.flat.FlatSamplerConfig; 14 | import com.nukethemoon.tools.opusproto.sampler.AbstractSampler; 15 | import com.nukethemoon.tools.opusproto.sampler.AbstractSamplerConfiguration; 16 | 17 | public class FlatSamplerForm extends AbstractSamplerForm { 18 | 19 | private final TextField valueTextField; 20 | 21 | public FlatSamplerForm(Skin skin, AbstractSampler sampler, Samplers pool) { 22 | super(skin, sampler, pool); 23 | defaults().center().pad(5); 24 | setBackground(Styles.INNER_BACKGROUND); 25 | 26 | 27 | Table valueTable = new Table(skin); 28 | valueTable.defaults().pad(2); 29 | Label label = new Label("value", skin); 30 | valueTable.add(label); 31 | 32 | valueTextField = new CursorTextField("", skin, this, 0.1f); 33 | valueTable.add(valueTextField).width(50); 34 | 35 | valueTextField.addListener(new ChangeListener() { 36 | @Override 37 | public void changed(ChangeEvent event, Actor actor) { 38 | notifyChanges(); 39 | } 40 | }); 41 | add(valueTable); 42 | row(); 43 | 44 | loadFromConfig(sampler.getConfig()); 45 | notifyChanges(); 46 | } 47 | 48 | @Override 49 | public boolean applyToConfig(AbstractSamplerConfiguration config) { 50 | FlatSamplerConfig c = (FlatSamplerConfig) sampler.getConfig(); 51 | 52 | boolean validRes = containsValidFloat(valueTextField); 53 | if (validRes) { 54 | c.value = Float.parseFloat(valueTextField.getText()); 55 | return true; 56 | } 57 | return false; 58 | } 59 | 60 | @Override 61 | public void loadFromConfig(AbstractSamplerConfiguration config) { 62 | valueTextField.setText(((FlatSamplerConfig) config).value + ""); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /project/editor/src/com/nukethemoon/tools/opusproto/editor/ui/windows/SettingsWindow.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.editor.ui.windows; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Label; 4 | import com.badlogic.gdx.scenes.scene2d.ui.Skin; 5 | import com.badlogic.gdx.scenes.scene2d.ui.Table; 6 | import com.nukethemoon.tools.opusproto.editor.ui.Styles; 7 | 8 | public class SettingsWindow extends ClosableWindow { 9 | 10 | public SettingsWindow(Skin skin) { 11 | super("SETTINGS", skin); 12 | top().left(); 13 | defaults().pad(5); 14 | 15 | int width = 300; 16 | 17 | Table shortcutsTable = new Table(skin); 18 | shortcutsTable.defaults().pad(4); 19 | shortcutsTable.top().left(); 20 | shortcutsTable.setBackground(Styles.INNER_BACKGROUND); 21 | Label shortcutsLabel = new Label("Shortcuts", skin); 22 | shortcutsTable.add(shortcutsLabel).colspan(2).left().top(); 23 | shortcutsTable.row(); 24 | 25 | Label refreshShortcutLabel = new Label("refresh world", skin); 26 | shortcutsTable.add(refreshShortcutLabel).width(width).left().top().fill(); 27 | shortcutsTable.add(new Label("[ENTER]", skin)).left().top(); 28 | shortcutsTable.row(); 29 | 30 | Label snapshotShortcutLabel = new Label("snapshot", skin); 31 | shortcutsTable.add(snapshotShortcutLabel).width(width).left().top().fill(); 32 | shortcutsTable.add(new Label("[s]", skin)).left().top(); 33 | shortcutsTable.row(); 34 | 35 | Label moveCameraLabel = new Label("move camera", skin); 36 | shortcutsTable.add(moveCameraLabel).width(width).left().top().fill(); 37 | shortcutsTable.add(new Label("[Mouse Right] + Drag", skin)).left().top(); 38 | shortcutsTable.row(); 39 | 40 | Label generateTiles = new Label("generate tiles", skin); 41 | shortcutsTable.add(generateTiles).width(width).left().top().fill(); 42 | shortcutsTable.add(new Label("[Mouse Left] + Drag", skin)).left().top(); 43 | shortcutsTable.row(); 44 | 45 | Label increaseLabel = new Label("increase value in a text field", skin); 46 | shortcutsTable.add(increaseLabel).width(width).left().top().fill(); 47 | shortcutsTable.add(new Label("[UP]", skin)).left().top(); 48 | shortcutsTable.row(); 49 | 50 | Label decreaseLabel = new Label("decrease value in a text field", skin); 51 | shortcutsTable.add(decreaseLabel).width(width).left().top().fill(); 52 | shortcutsTable.add(new Label("[DOWN]", skin)).left().top(); 53 | shortcutsTable.row(); 54 | 55 | add(shortcutsTable); 56 | 57 | pack(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /project/opuslib/src/com/nukethemoon/tools/opusproto/region/ChunkRequestBuffer.java: -------------------------------------------------------------------------------- 1 | package com.nukethemoon.tools.opusproto.region; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class ChunkRequestBuffer { 7 | 8 | private List samplerDataBuffer = new ArrayList(); 9 | 10 | public void clear() { 11 | samplerDataBuffer.clear(); 12 | } 13 | 14 | public void addSamplerData(String samplerId, double seed, float scale, float resolution, float[][] data) { 15 | DataContainer dc = getContainer(samplerId, seed, scale, resolution); 16 | if (dc == null) { 17 | samplerDataBuffer.add(new DataContainer(samplerId, seed, scale, resolution, data)); 18 | } 19 | if (dc != null) { 20 | dc.data = data; 21 | } 22 | } 23 | 24 | public float[][] getSamplerData(String samplerId, double seed, float scale, float resolution) { 25 | DataContainer container = getContainer(samplerId, seed, scale, resolution); 26 | if (container != null) { 27 | return container.data; 28 | } 29 | return null; 30 | } 31 | 32 | private DataContainer getContainer(String samplerId, double seed, float scale, float resolution) { 33 | for (DataContainer container : samplerDataBuffer) { 34 | if (container.samplerId.equals(samplerId) 35 | && container.seed == seed && container.scale == scale && container.resolution == resolution) { 36 | return container; 37 | } 38 | } 39 | return null; 40 | } 41 | 42 | public boolean containsSamplerData(String samplerId, double seed, float scale, float resolution) { 43 | return getContainer(samplerId, seed, scale, resolution) != null; 44 | } 45 | 46 | 47 | public static class DataContainer { 48 | public String samplerId; 49 | public double seed; 50 | public float scale; 51 | public float resolution; 52 | public float[][] data; 53 | 54 | public DataContainer(String samplerId, double seed, float scale, float resolution, float[][] data) { 55 | this.resolution = resolution; 56 | this.data = data; 57 | this.samplerId = samplerId; 58 | this.seed = seed; 59 | this.scale = scale; 60 | } 61 | 62 | @Override 63 | public boolean equals(Object obj) { 64 | if (obj == null) { 65 | return false; 66 | } 67 | if (obj instanceof DataContainer) { 68 | DataContainer di = (DataContainer) obj; 69 | return di.samplerId.equals(samplerId) && di.seed == seed && di.scale == scale && resolution == di.resolution; 70 | } 71 | return false; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /project/editor/data/docu/modifier.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Modifier 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Modifier

15 | 16 |

17 | A modifier changes the value of a Sampler. Modifiers are computed one after another, 18 | from th first to the last. 19 |

20 | 21 | 22 |
23 |

Multiply

24 |
return value * modifier;
25 |
26 |
27 |

Add

28 |
return value + modifier;
29 |
30 |
31 |

Max

32 |
return Math.max(value, modifier);
33 |
34 |
35 |

Min

36 |
return Math.min(value, modifier);
37 |
38 |
39 |

Step

40 |
float i = 0;
41 | while (i * (1f / modification) < value) {
42 | 	i = i + 1;
43 | }
44 | return i * (1f / modification);
45 | 
46 |
47 |
48 |

Limit (no parameter)

49 |
return Math.max(Math.min(value, 1f), 0f);
50 |
51 |
52 |

Sharpen

53 |
float distance = value - 0.5f;
54 | value = (float) Math.tanh(distance * modifier);
55 | return  (value + 1) / 2;
56 | 57 |
58 |
59 |

Sin

60 |
return (float) (Math.sin(value * Math.PI * modifier) + 1f) / 2f;
61 |
62 |
63 |

Pow

64 |
return (float) Math.pow(value, modifier);
65 |
66 |
67 |

HigherThan

68 |
if (value > modification) {
69 | 	return value;
70 | } else {
71 | 	return 0;
72 | }
73 |
74 |
75 |

Invert

76 |
return 1f - value;
77 |
78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | -webkit-text-size-adjust: none; 15 | } 16 | 17 | .hljs-keyword, 18 | .hljs-tag, 19 | .css .hljs-class, 20 | .css .hljs-id, 21 | .lisp .hljs-title, 22 | .nginx .hljs-title, 23 | .hljs-request, 24 | .hljs-status, 25 | .clojure .hljs-attribute { 26 | color: #e3ceab; 27 | } 28 | 29 | .django .hljs-template_tag, 30 | .django .hljs-variable, 31 | .django .hljs-filter .hljs-argument { 32 | color: #dcdcdc; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-date { 37 | color: #8cd0d3; 38 | } 39 | 40 | .dos .hljs-envvar, 41 | .dos .hljs-stream, 42 | .hljs-variable, 43 | .apache .hljs-sqbracket, 44 | .hljs-name { 45 | color: #efdcbc; 46 | } 47 | 48 | .dos .hljs-flow, 49 | .diff .hljs-change, 50 | .python .exception, 51 | .python .hljs-built_in, 52 | .hljs-literal, 53 | .tex .hljs-special { 54 | color: #efefaf; 55 | } 56 | 57 | .diff .hljs-chunk, 58 | .hljs-subst { 59 | color: #8f8f8f; 60 | } 61 | 62 | .dos .hljs-keyword, 63 | .hljs-decorator, 64 | .hljs-title, 65 | .hljs-type, 66 | .diff .hljs-header, 67 | .ruby .hljs-class .hljs-parent, 68 | .apache .hljs-tag, 69 | .nginx .hljs-built_in, 70 | .tex .hljs-command, 71 | .hljs-prompt { 72 | color: #efef8f; 73 | } 74 | 75 | .dos .hljs-winutils, 76 | .ruby .hljs-symbol, 77 | .ruby .hljs-symbol .hljs-string, 78 | .ruby .hljs-string { 79 | color: #dca3a3; 80 | } 81 | 82 | .diff .hljs-deletion, 83 | .hljs-string, 84 | .hljs-tag .hljs-value, 85 | .hljs-preprocessor, 86 | .hljs-pragma, 87 | .hljs-built_in, 88 | .smalltalk .hljs-class, 89 | .smalltalk .hljs-localvars, 90 | .smalltalk .hljs-array, 91 | .css .hljs-rule .hljs-value, 92 | .hljs-attr_selector, 93 | .hljs-pseudo, 94 | .apache .hljs-cbracket, 95 | .tex .hljs-formula, 96 | .coffeescript .hljs-attribute { 97 | color: #cc9393; 98 | } 99 | 100 | .hljs-shebang, 101 | .diff .hljs-addition, 102 | .hljs-comment, 103 | .hljs-annotation, 104 | .hljs-pi, 105 | .hljs-doctype { 106 | color: #7f9f7f; 107 | } 108 | 109 | .coffeescript .javascript, 110 | .javascript .xml, 111 | .tex .hljs-formula, 112 | .xml .javascript, 113 | .xml .vbscript, 114 | .xml .css, 115 | .xml .hljs-cdata { 116 | opacity: 0.5; 117 | } 118 | 119 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | .hljs { 11 | display: block; 12 | overflow-x: auto; 13 | padding: 0.5em; 14 | background-color: #f4f4f4; 15 | -webkit-text-size-adjust: none; 16 | } 17 | 18 | .hljs, 19 | .hljs-subst { 20 | color: black; 21 | } 22 | 23 | .hljs-string, 24 | .hljs-title, 25 | .hljs-parent, 26 | .hljs-tag .hljs-value, 27 | .hljs-rule .hljs-value, 28 | .hljs-preprocessor, 29 | .hljs-pragma, 30 | .ruby .hljs-symbol, 31 | .ruby .hljs-symbol .hljs-string, 32 | .hljs-template_tag, 33 | .django .hljs-variable, 34 | .smalltalk .hljs-class, 35 | .hljs-addition, 36 | .hljs-flow, 37 | .hljs-stream, 38 | .bash .hljs-variable, 39 | .apache .hljs-cbracket, 40 | .coffeescript .hljs-attribute { 41 | color: #050; 42 | } 43 | 44 | .hljs-comment, 45 | .hljs-annotation, 46 | .diff .hljs-header, 47 | .hljs-chunk { 48 | color: #777; 49 | } 50 | 51 | .hljs-number, 52 | .hljs-date, 53 | .hljs-regexp, 54 | .hljs-literal, 55 | .hljs-name, 56 | .smalltalk .hljs-symbol, 57 | .smalltalk .hljs-char, 58 | .hljs-change, 59 | .tex .hljs-special { 60 | color: #800; 61 | } 62 | 63 | .hljs-label, 64 | .ruby .hljs-string, 65 | .hljs-decorator, 66 | .hljs-filter .hljs-argument, 67 | .hljs-localvars, 68 | .hljs-array, 69 | .hljs-attr_selector, 70 | .hljs-pseudo, 71 | .hljs-pi, 72 | .hljs-doctype, 73 | .hljs-deletion, 74 | .hljs-envvar, 75 | .hljs-shebang, 76 | .apache .hljs-sqbracket, 77 | .nginx .hljs-built_in, 78 | .tex .hljs-formula, 79 | .hljs-prompt, 80 | .clojure .hljs-attribute { 81 | color: #00e; 82 | } 83 | 84 | .hljs-keyword, 85 | .hljs-id, 86 | .hljs-doctag, 87 | .hljs-title, 88 | .hljs-built_in, 89 | .smalltalk .hljs-class, 90 | .hljs-winutils, 91 | .bash .hljs-variable, 92 | .apache .hljs-tag, 93 | .xml .hljs-tag, 94 | .tex .hljs-command, 95 | .hljs-request, 96 | .hljs-status { 97 | font-weight: bold; 98 | color: navy; 99 | } 100 | 101 | .nginx .hljs-built_in { 102 | font-weight: normal; 103 | } 104 | 105 | .coffeescript .javascript, 106 | .javascript .xml, 107 | .tex .hljs-formula, 108 | .xml .javascript, 109 | .xml .vbscript, 110 | .xml .css, 111 | .xml .hljs-cdata { 112 | opacity: 0.5; 113 | } 114 | 115 | /* --- */ 116 | .apache .hljs-tag { 117 | font-weight: bold; 118 | color: blue; 119 | } 120 | 121 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/school_book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 15px 0.5em 0.5em 30px; 11 | font-size: 11px !important; 12 | line-height:16px !important; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | pre{ 17 | background:#f6f6ae url(./school_book.png); 18 | border-top: solid 2px #d2e8b9; 19 | border-bottom: solid 1px #d2e8b9; 20 | } 21 | 22 | .hljs-keyword, 23 | .hljs-literal, 24 | .hljs-change, 25 | .hljs-winutils, 26 | .hljs-flow, 27 | .nginx .hljs-title, 28 | .tex .hljs-special { 29 | color:#005599; 30 | font-weight:bold; 31 | } 32 | 33 | .hljs, 34 | .hljs-subst, 35 | .hljs-tag .hljs-keyword { 36 | color: #3e5915; 37 | } 38 | 39 | .hljs-string, 40 | .hljs-title, 41 | .hljs-type, 42 | .hljs-tag .hljs-value, 43 | .css .hljs-rule .hljs-value, 44 | .hljs-preprocessor, 45 | .hljs-pragma, 46 | .ruby .hljs-symbol, 47 | .ruby .hljs-symbol .hljs-string, 48 | .ruby .hljs-class .hljs-parent, 49 | .hljs-built_in, 50 | .django .hljs-template_tag, 51 | .django .hljs-variable, 52 | .smalltalk .hljs-class, 53 | .ruby .hljs-string, 54 | .django .hljs-filter .hljs-argument, 55 | .smalltalk .hljs-localvars, 56 | .smalltalk .hljs-array, 57 | .hljs-attr_selector, 58 | .hljs-pseudo, 59 | .hljs-addition, 60 | .hljs-stream, 61 | .hljs-envvar, 62 | .apache .hljs-tag, 63 | .apache .hljs-cbracket, 64 | .nginx .hljs-built_in, 65 | .tex .hljs-command, 66 | .coffeescript .hljs-attribute, 67 | .hljs-name { 68 | color: #2c009f; 69 | } 70 | 71 | .hljs-comment, 72 | .hljs-annotation, 73 | .hljs-decorator, 74 | .hljs-pi, 75 | .hljs-doctype, 76 | .hljs-deletion, 77 | .hljs-shebang, 78 | .apache .hljs-sqbracket { 79 | color: #e60415; 80 | } 81 | 82 | .hljs-keyword, 83 | .hljs-literal, 84 | .css .hljs-id, 85 | .hljs-doctag, 86 | .hljs-title, 87 | .hljs-type, 88 | .vbscript .hljs-built_in, 89 | .rsl .hljs-built_in, 90 | .smalltalk .hljs-class, 91 | .xml .hljs-tag .hljs-title, 92 | .diff .hljs-header, 93 | .hljs-chunk, 94 | .hljs-winutils, 95 | .bash .hljs-variable, 96 | .apache .hljs-tag, 97 | .tex .hljs-command, 98 | .hljs-request, 99 | .hljs-status { 100 | font-weight: bold; 101 | } 102 | 103 | .coffeescript .javascript, 104 | .javascript .xml, 105 | .tex .hljs-formula, 106 | .xml .javascript, 107 | .xml .vbscript, 108 | .xml .css, 109 | .xml .hljs-cdata { 110 | opacity: 0.5; 111 | } 112 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-cave.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Cave Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Cave Comment */ 6 | .hljs-comment { 7 | color: #7e7887; 8 | } 9 | 10 | /* Atelier-Cave Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #be4678; 25 | } 26 | 27 | /* Atelier-Cave Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #aa573c; 35 | } 36 | 37 | /* Atelier-Cave Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #a06e3b; 41 | } 42 | 43 | /* Atelier-Cave Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #2a9292; 51 | } 52 | 53 | /* Atelier-Cave Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #398bc6; 57 | } 58 | 59 | /* Atelier-Cave Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #576ddb; 69 | } 70 | 71 | /* Atelier-Cave Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #955ae7; 75 | } 76 | 77 | .diff .hljs-deletion, 78 | .diff .hljs-addition { 79 | color: #19171c; 80 | display: inline-block; 81 | width: 100%; 82 | } 83 | 84 | .diff .hljs-deletion { 85 | background-color: #be4678; 86 | } 87 | 88 | .diff .hljs-addition { 89 | background-color: #2a9292; 90 | } 91 | 92 | .diff .hljs-change { 93 | color: #576ddb; 94 | } 95 | 96 | .hljs { 97 | display: block; 98 | overflow-x: auto; 99 | background: #19171c; 100 | color: #8b8792; 101 | padding: 0.5em; 102 | -webkit-text-size-adjust: none; 103 | } 104 | 105 | .coffeescript .javascript, 106 | .javascript .xml, 107 | .tex .hljs-formula, 108 | .xml .javascript, 109 | .xml .vbscript, 110 | .xml .css, 111 | .xml .hljs-cdata { 112 | opacity: 0.5; 113 | } 114 | -------------------------------------------------------------------------------- /project/editor/data/docu/js/highlight/styles/atelier-cave.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Cave Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Cave Comment */ 6 | .hljs-comment { 7 | color: #655f6d; 8 | } 9 | 10 | /* Atelier-Cave Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #be4678; 25 | } 26 | 27 | /* Atelier-Cave Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #aa573c; 35 | } 36 | 37 | /* Atelier-Cave Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #a06e3b; 41 | } 42 | 43 | /* Atelier-Cave Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #2a9292; 51 | } 52 | 53 | /* Atelier-Cave Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #398bc6; 57 | } 58 | 59 | /* Atelier-Cave Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #576ddb; 69 | } 70 | 71 | /* Atelier-Cave Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #955ae7; 75 | } 76 | 77 | .diff .hljs-deletion, 78 | .diff .hljs-addition { 79 | color: #19171c; 80 | display: inline-block; 81 | width: 100%; 82 | } 83 | 84 | .diff .hljs-deletion { 85 | background-color: #be4678; 86 | } 87 | 88 | .diff .hljs-addition { 89 | background-color: #2a9292; 90 | } 91 | 92 | .diff .hljs-change { 93 | color: #576ddb; 94 | } 95 | 96 | .hljs { 97 | display: block; 98 | overflow-x: auto; 99 | background: #efecf4; 100 | color: #585260; 101 | padding: 0.5em; 102 | -webkit-text-size-adjust: none; 103 | } 104 | 105 | .coffeescript .javascript, 106 | .javascript .xml, 107 | .tex .hljs-formula, 108 | .xml .javascript, 109 | .xml .vbscript, 110 | .xml .css, 111 | .xml .hljs-cdata { 112 | opacity: 0.5; 113 | } 114 | --------------------------------------------------------------------------------