mirror of
https://github.com/penpot/penpot.git
synced 2025-02-01 11:59:17 -05:00
wip
This commit is contained in:
parent
6b50c17781
commit
1299074bd9
1 changed files with 21 additions and 3 deletions
|
@ -93,6 +93,7 @@
|
||||||
|
|
||||||
;; CONTEXT
|
;; CONTEXT
|
||||||
page-id (mf/use-ctx ctx/current-page-id)
|
page-id (mf/use-ctx ctx/current-page-id)
|
||||||
|
page (mf/deref refs/workspace-page)
|
||||||
|
|
||||||
;; DEREFS
|
;; DEREFS
|
||||||
drawing (mf/deref refs/workspace-drawing)
|
drawing (mf/deref refs/workspace-drawing)
|
||||||
|
@ -264,9 +265,11 @@
|
||||||
rule-area-size (/ rules/rule-area-size zoom)
|
rule-area-size (/ rules/rule-area-size zoom)
|
||||||
|
|
||||||
;; Aquí podemos configurar como queremos que sea el renderizado:
|
;; Aquí podemos configurar como queremos que sea el renderizado:
|
||||||
|
;;
|
||||||
;; - "gl" Utilizando sólo WebGL2
|
;; - "gl" Utilizando sólo WebGL2
|
||||||
;; - "svg" Utilizando sólo SVG
|
;; - "svg" Utilizando sólo SVG
|
||||||
;; - "both" Utilizando ambos
|
;; - "both" Utilizando ambos
|
||||||
|
;;
|
||||||
renderer "both"]
|
renderer "both"]
|
||||||
|
|
||||||
(hooks/setup-dom-events zoom disable-paste in-viewport? workspace-read-only?)
|
(hooks/setup-dom-events zoom disable-paste in-viewport? workspace-read-only?)
|
||||||
|
@ -342,7 +345,8 @@
|
||||||
(when (dbg/enabled? :show-export-metadata)
|
(when (dbg/enabled? :show-export-metadata)
|
||||||
[:& use/export-page {:options options}])
|
[:& use/export-page {:options options}])
|
||||||
|
|
||||||
;; We need a "real" background shape so layer transforms work properly in firefox
|
;; We need a "real" background shape so layer
|
||||||
|
;; transforms work properly in firefox
|
||||||
[:rect {:width (:width vbox 0)
|
[:rect {:width (:width vbox 0)
|
||||||
:height (:height vbox 0)
|
:height (:height vbox 0)
|
||||||
:x (:x vbox 0)
|
:x (:x vbox 0)
|
||||||
|
@ -356,7 +360,11 @@
|
||||||
:objects base-objects
|
:objects base-objects
|
||||||
:active-frames @active-frames}]]]])
|
:active-frames @active-frames}]]]])
|
||||||
|
|
||||||
|
;;-----------------------------------
|
||||||
|
;;
|
||||||
;; IT's MAGIC!
|
;; IT's MAGIC!
|
||||||
|
;;
|
||||||
|
;;-----------------------------------
|
||||||
(when (or (= renderer "gl") (= renderer "both"))
|
(when (or (= renderer "gl") (= renderer "both"))
|
||||||
[gl/canvas {:objects base-objects
|
[gl/canvas {:objects base-objects
|
||||||
:active-frames @active-frames
|
:active-frames @active-frames
|
||||||
|
@ -645,4 +653,14 @@
|
||||||
:objects base-objects
|
:objects base-objects
|
||||||
:modifiers modifiers
|
:modifiers modifiers
|
||||||
:shape frame
|
:shape frame
|
||||||
:view-only true}]))]]]]))
|
:view-only true}]))]]]
|
||||||
|
|
||||||
|
(when (= (:name page) "DOOM")
|
||||||
|
[:iframe {:src "/wasm/doom/index.html"
|
||||||
|
:width 1280
|
||||||
|
:height 720
|
||||||
|
:style {:position "absolute"
|
||||||
|
:top 0
|
||||||
|
:left 0
|
||||||
|
:z-index 10000
|
||||||
|
:pointer-events "all"}}])]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue