I just want to display the canvas image in my laravel project.
I had already tried the canvas in separate files like Html and PHP files the canvas is working but when I am trying to show the canvas image in my laravel project total image is not displaying.
@section('content-wrapper')
<canvas id="canvas" width="484" height="984"></canvas>
@endsection
@push('scripts')
<script src="https://www.marvinj.org/releases/marvinj-0.8.js"></script>
<script>
var canvas = document.getElementById("canvas");
image1 = new MarvinImage();
image1.load("packages/Webkul/Shop/src/Resources/assets/images/Group 1.png", imageLoaded);
image2 = new MarvinImage();
image2.load("packages/Webkul/Shop/src/Resources/assets/images/Rectangle 5.png", imageLoaded);
image3 = new MarvinImage();
image3.load("packages/Webkul/Shop/src/Resources/assets/images/Motif_2.png", imageLoaded);
image4 = new MarvinImage();
image4.load("packages/Webkul/Shop/src/Resources/assets/images/body_design_2.png", imageLoaded);
var loaded=0;
function imageLoaded(){
if(++loaded == 4){
var image = new MarvinImage(image1.getWidth(), image1.getHeight());
Marvin.combineByAlpha(image1, image2, image, 43, 0);
Marvin.combineByAlpha(image, image3, image, 0, 0);
Marvin.combineByAlpha(image, image4, image, 50, 0);
image.draw(canvas);
}
}
</script>
@endpush
Just want to display the canvas in my laravel project.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2LaNTO4
via IFTTT
Aucun commentaire:
Enregistrer un commentaire