Deskat Online Editor Guide
This guide will help you master the Deskat 3D Cat Tree Online Editor. Learn how to place, stack, and fine-tune modular components, and verify design safety through our built-in physics engine.
⚡ 1. Interface & Modules Overview
The editor layout is split into five main functional regions, providing a seamless and intuitive 3D modeling experience:
Left - Catalog Panel
Modular parts organized into Baseboards, Columns, Nests, Platforms, and Toys. Click any item to enter placing mode on the canvas.
Center - 3D Viewport Canvas
Interact with the 3D scene: Left-click and drag to rotate, right-click (or ctrl+left) to pan, scroll wheel to zoom in and out.
Right - Property Inspector
Appears upon selecting a component. Modify coordinates, height, rotation angle, and switch textures (wood, flannel, sisal colors).
Top & Bottom - Status & Tools
Top toolbar houses undo/redo, saving, theme toggle. Bottom displays active scheme name and a floating nudge panel.
🧱 2. Grid Alignment & Baseboard placement
Every cat tree requires a stable foundation. You must place at least one baseboard on the ground before stackable components can be placed.
5cm Grid Magnetism
The viewport features an active snapping grid based on 50mm (5cm) increments. Components snap magnetically to alignment intersections to ensure symmetry and prevent misalignment during real-world manufacturing.
Multiple baseboard templates are available (rectangular, circular, L-shaped). Using the right inspector panel, you can adjust dimensions dynamically to fit specific apartment layouts.
⚙️ 3. Column Stacking & Surface Materials
Columns act as the skeletal pillars of the cat tree structure. Stacking is made simple through smart-snapping triggers:
- Connection Snapping: Hovering over existing columns or baseboards displays a blue snap indicator. Clicking links them together immediately.
- Height Selection: Choose from preset industrial lengths (20cm to 100cm) or fine-tune height slide meters in the Inspector.
Pillar Textures & Ropes
| Texture Type | Visual Appearance | Functional Description |
|---|---|---|
| Natural Jute Sisal | Warm Golden Beige Rope | High friction jute rope, perfect for cats claw scratching. |
| White Cotton Rope | Cream Off-White Cotton | Soft textures, static-free, blends perfectly into modern interior styling. |
| Polished Solid Wood | Polished Plywood Grain | Sleek wood finish, easily wiped clean, used for quick ascending posts. |
❓ 4. Resting Platforms & Snapping Nests
Platforms and nesting structures are the functional activity areas where cats relax, observe, and sleep.
Wooden Nests & Space Capsules
Features enclosed plywood nesting boxes and spherical acrylic space capsules to observe paws from underneath.
360-Degree Rotation Steps
Select any nest or platform and drag the rotation slider or use hotkeys to rotate it around the central column support.
Plywood surfaces can be customized with soft warm cotton cushions to maximize comfort and friction when scaling platforms.
✨ 5. Dangling Play Accessories & Ladders
Toys and connectable accessories enrich the cat tree layout with play options and additional pathways:
- Dangling Plush Balls: Can be hung from any platform bottom ceiling. Springy elastic lines with soft balls trigger play impulses.
- Heavy Sisal Play Rope: Stout scratching ropes attached to columns let cats grasp and wrestle suspended in mid-air.
- Climbing Ramps & Ladders: Bridges wood steps or scratching inclined boards between platform tiers for kittens or senior cats.
⚠️ 6. Real-Time Physics & Safety Analysis
Deskat integrates complex dynamic mechanics checking to prevent real-world tilting and tipping hazards:
Stability Level Evaluations
The center of gravity is securely centered inside the base boards convex hull. Safe for active cats to jump.
Height-to-base ratio is high, or weight shifts off-center. Leaping cats might cause slight wobble. Consider expanding base boards.
Center of gravity falls outside the base boundary. Will fall over naturally even without force. Export disabled.
⌨️ 7. Shortcuts & Keyboard Snapping
To achieve pixel-perfect symmetrical designs, utilize standard keyboard shortcuts. A floating nudge helper appears at the bottom-right:
| Shortcut Key | Action Details & Functional Descriptions |
|---|---|
| W / A / S / D | Nudge selected parts forwards, backwards, left, or right by 5cm in the 2D grid. |
| ↑ / ↓ / ← / → | Arrow keys, same as WASD, nudges location horizontally. |
| Q / E | Raise (Q) or lower (E) the vertical altitude coordinates. |
| R / Shift + R | Rotate current component by 15-degree steps clockwise or counter-clockwise. |
| Delete / Backspace | Permanently delete selected item (and stackable child pieces). |
| Escape | Deselect current component and clear the properties panel. |
| Ctrl + Z / Ctrl + Y | Standard Undo (Ctrl+Z) and Redo (Ctrl+Y) timeline controls. |
💾 8. Saving Schemes, Import & 3D GLB Export
Deskat acts as a gateway from design to real production, offering seamless file exchanges:
- IndexedDB Browser Storage: Save your work directly in the local browser cache. Access them via the load dashboard instantly.
- Export encrypted .deskat configurations: A lightweight string format (<20KB) containing coordinates and materials definitions, perfect for sharing and web embeds.
- Export industry-standard GLB 3D meshes: Compiles meshes, coordinates, and custom HSL textures into standard GLB formats, ready to load in Blender, 3ds Max, or AR tools.
Deskat 3D Viewer Embed Guide
Learn how to integrate the zero-dependency, lightweight deskat-viewer.js widget to render interactive 3D cat trees on your own e-commerce store or management systems.
⚡ 1. Introduction
The Deskat 3D Viewer is a lightweight rendering utility. It parses modular .deskat blueprints, builds three-dimensional meshes on-the-fly, calculates stability indices, and exports ready-to-use GLB files directly on clientside.
Zero Dependencies
All rendering meshes and controls packaged inside a single script. No external styles or assets are loaded.
High Performance
Responsive container adaptations and mobile touch events ensure smooth orbital rotation on mobile phones.
💻 2. Global Auto-Init (Quick Start)
The simplest integration. Declare an HTML element container with the ID deskat_display, configure your options in global window scope, and load the script. Auto-initialization triggers out of the box:
<!-- 1. Declare container element (声明 3D 视口挂载容器) -->
<div id="deskat_display"></div>
<!-- 2. Configure variables (配置小部件变量) -->
<script>
var dk_location = 'classic-62.deskat'; // Path to .deskat file (.deskat 方案文件路径)
var dk_width = '100%'; // Container width (容器宽度样式)
var dk_height = '550px'; // Container height (容器高度样式)
var dk_theme = 'light'; // Theme: 'light' | 'dark' (初始化配色: 'light' | 'dark')
var dk_lang = 'zh'; // Language: 'en' | 'zh' (默认语种: 'en' | 'zh')
var dk_enable_open = true; // Show local file picker (是否显示本地浏览/拖拽解析面板)
</script>
<!-- 3. Reference the viewer script (引入公共 CDN 脚本) -->
<script src="//deskat.globlazer.com/deskat-viewer.js"></script>
⚙️ 3. Programmatic JavaScript API
For Single Page Applications (React, Vue, Angular) or views managing multiple visualizer canvas instances simultaneously, instantiate programmatically via DeskatViewer.init():
<!-- 1. Define custom container (自定义 ID 视口容器) -->
<div id="custom-model-container"></div>
<!-- 2. Include viewer script (引入 CDN 文件) -->
<script src="//deskat.globlazer.com/deskat-viewer.js"></script>
<!-- 3. Programmatic initialization (JS 动态渲染) -->
<script>
// Note: Avoid declaring window variables starting with dk_ to prevent auto-init interference (注意:不要在 window 下声明以 dk_ 开头的变量,避免干扰自动初始化)
DeskatViewer.init({
location: 'classic-62.deskat', // Path to file (相对或绝对路径)
containerId: 'custom-model-container', // Target container DOM ID (目标挂载 DOM ID)
width: '100%',
height: '600px',
theme: 'dark',
lang: 'en',
enableOpen: true,
enableExportDeskat: true,
enableExportGlb: true,
enableDesignEdit: true
}).then(function(visualizer) {
if (visualizer) {
console.log('Deskat 3D Viewer initialized successfully! (Deskat 3D Viewer 初始化成功!)');
}
});
</script>
🌐 4. Overcoming CORS limits & Offline Sandboxing
Due to browser security enforcement when performing XMLHttpRequests/fetch on files, two common blocks arise:
1. Cross-Origin Resource Sharing (CORS)
If the model file is fetched across origins, the file server must return the following access header:
Access-Control-Allow-Origin: *
2. Local file:/// Offline Restrictions
When double-clicking a local HTML file directly, modern browsers sandbox local drives and prohibit fetching local disk files like fetch('classic-62.deskat').
To bypass both CORS and file:/// restrictions (enabling immediate offline double-click operation), pass the obfuscated content of the .deskat file directly as a raw data string:
<!-- Works offline without cross-origin blocks (完全离线可运行,无视任何跨域拦截!) -->
<div id="deskat_display"></div>
<script>
// Paste the encrypted string content of the .deskat file here (复制 .deskat 中的文本串贴在此处)
var dk_data = "M3t9QH5cT013W3p6d...[直接贴入这长串混淆文本]";
var dk_width = "100%";
var dk_height = "600px";
</script>
<script src="//deskat.globlazer.com/deskat-viewer.js"></script>
⚙️ 5. Configuration Parameters
A complete list of setup attributes for both global settings (dk_) and programmatic initialization parameters:
| Global Scope | API Option | Type | Default | Description |
|---|---|---|---|---|
| dk_location | location | string | undefined | URL to fetch target .deskat file. |
| dk_data | data | string | object | undefined | Encrypted data string or parsed JSON workspace state. |
| dk_id | containerId | string | 'deskat_display' | Target DOM node ID to mount visualizer. |
| dk_theme | theme | 'light' | 'dark' | 'light' | Initial visualizer theme style. |
| dk_lang | lang | 'en' | 'zh' | 'zh' | User interface translation language. |
| dk_enable_open | enableOpen | boolean | true | Enable file upload picker and drag-drop overlays. |
| dk_enable_export_deskat | enableExportDeskat | boolean | false | Show button to download active configuration. |
| dk_enable_export_glb | enableExportGlb | boolean | false | Show button to compile and download GLB model. |
| dk_enable_design | enableDesignEdit | boolean | false | Enable Design button to route user data to editor. |
💻 6. API Methods Reference
Once initialized successfully, call these instance methods programmatically from your hosting page controls:
setTheme(themeName: 'light' | 'dark')
Dynamically swaps the visual theme of the 3D scene.
setAutoRotate(enabled: boolean, speedMultiplier?: number)
Toggle slow continuous orbit rotation around center of gravity.
resetCameraToDefault()
Animate camera back to default angle and distance.
exportGLB(): Promise<Blob>
Asynchronously compiles meshes and textures, returning a downloadable GLB Blob.
setWatermark(text: string, size?: number, height?: number)
Render custom relief text overlay in the background backdrop.
🔄 7. Interactive Live Playground
Modify parameters in the control board below, and the embedded widget on the right will dynamically re-compile. Loads classic-62.deskat.